Specify Alternate Windows Login Credentials

Apr 28, 2008

Is it possible for me to login using windows login information that is separate from my current windows login? That is to say, can I login to a SQL server using windows athentication but actually specify the login and domain information? I woul like to login to a SQL server from a computer that is not part of the domain using my windows credentials and not a SQL user name.

View 5 Replies


ADVERTISEMENT

Setting Up An Alternate Login To Sa

Oct 25, 2007

In times past I connected my web app to SQL Server by embedding the following in the web.config file:    <connectionStrings>      <add name="XyzApp_DB" connectionString="Data Source=MyServerSQLExpress;Database=XyzApp;User ID=sa;Password=secret_password"/>    </connectionStrings> And it worked fine.  But it was pointed out to me that this wasn't a very proper way to do things.  So I was advised to set things up with a different connection string:    <connectionStrings>
      <add name="XyzApp_DB" connectionString="Data
Source=MyServerSQLExpress;Database=XyzApp;User
ID=Xyz_Admin;Password=different_password"/>
    </connectionStrings> 
To get this to work, I've followed these instructions:   A
more secure login than “saâ€? is required to access your application.  In the “connectionStringsâ€? section of
“Web.configâ€? you’ll find a User ID called “Xyz_Adminâ€?.  Here are the steps to ensure that your
DB has this login id:

a.       Using
the Microsoft SQL Server Management tool, look in the root for the “Security�
folder and open it.  Inside that, open
the “Logins� folder.

b.      If
“Xyz_Admin� doesn’t exist then right-click on “Logins� and choose “New Login�:

                                                  
i.           
Enter “Xyz_Admin� in the “Login name� textbox.

                                                
ii.           
Click on “User Mapping� on the left side and in the
‘Map’ column check the box beside “XyzApp�.

                                               
iii.           
Go back to the “General� page and choose SQL Server
Authentication.

                                              
iv.           
Specify any secret password you wish.

                                                
v.           
You can uncheck “Enforce password expiration� if you
wish.

                                              
vi.           
Specify “XyzApp� as the default database and press
OK.

c.      
Open “Databases�, right-click on “XyzApp� and
select “New Queryâ€?.  Run this query: sp_change_users_login 'update_one',
'xyz_admin', 'xyz_admin'



 Now, I was pretty sure that this procedure was working fine but it doesn't seem to work for me today.  I know that the client computer I'm using can connect to the DB on the server because I temporarily changed the User Id to "sa" and it connected fine.  But when I change it back to "Xyz_Admin" it does not.  So I'm thinking that there's something incorrect with the procedure above but I don't know what.Any ideas?Robert W. 

View 2 Replies View Related

App Login Using Credentials From SQL Table

Jun 17, 2004

I'm trying to create a login screen that will verify a user's username and password from within a SQL table. If the credentials are found in the table, they should be sent to a Main Menu screen. If the credentials are not found, I will throw a message on the screen. Does anyone have code to accomplish this? I am at a total standstill.

Thanks,
BoydM

View 5 Replies View Related

DB Engine :: Overriding Ssms Windows Credentials

Oct 2, 2015

I just installed sql server 2014 on a second pc I will be using to vpn into our parent company's domain.  When I use explorer to look at file system folders on servers in the parent domain on which I have permissions, I am prompted correctly for my windows creds in their domain which are different from the creds in my originating domain and I can see those files.  But when I open ssms and try to connect using server name or ip address, I see two problems....

1) ssms is using my originating domain creds without giving me the opportunity to change them
2) whether I use a server name or ip address I get an error saying login from an untrusted domain cannot be used with windows auth 18452.

View 11 Replies View Related

Help Using Domain Credentials Or Integrated Login.

Mar 13, 2008

This is a two part question. We are currently using the ODBC method SQLConnect to connect to an existing DSN:


m_retcode = SQLConnect(

m_hDbc,

(SQLTCHAR*)datasource,

(SWORD)_tcslen(datasource),

(SQLTCHAR*)username,

(SWORD)_tcslen(username),

(SQLTCHAR*)password,

(SWORD)_tcslen(password) );


using a SQL user created for that purpose (and yes the password is encrypted elsewhere). I have had a request to be able to use a Windows domain account in the same setting however it does not appear that i can simply enter either "domainusername" or "username" (SQL Server and the login machine are in the same domain.

Is it possible to accomplish this with this function or should I use a different routine to obtain a connection? How would I accomplish this if I instead wanted to use integrated login?

The "client" is running Windows XP, 2000, 2003, or Vista (Business). The database server is running SQL 200 or 2005 on Windows 2003 Server (or possibly Windows 2000 Server).

Hope this description is not too murky.

Cheers,

Lyman Hurd


View 1 Replies View Related

Need A SqlServer Stored Procedur To Check Login Credentials

Mar 10, 2006

Sid writes "Hi,
can anybody plz provide me the stored procedure for checking the credentials(uid,Pwd) of a login page in sqlserver.

Thanks,
Sid."

View 2 Replies View Related

Creating Credentials And Proxies Pointing To SQL Server Login To Run A Job

Nov 8, 2006

How to "CREATE credentials pointing to SQL SERVER logins" and "creating proxys for SQL server agent pointing to SQL SERVER login.

As The SQL server login does not display in the CHECK NAMES list when we are trying to select the identity but All the other Windows logins display correctly in this list .

So using the SQLserver login fails to run a SQL server Job (which uses the credentials and proxies pionting to SQL server logins)

View 1 Replies View Related

Reporting Services :: Data Extension Supports Windows Integrated Security And No Credentials Only

Feb 22, 2011

I am trying to fetch the sharepoint list data into the SSRS report.

I have given credentials in shared datasource to access remote datasource.

In preview i m getting the following error:

Data extension supports windows integrated security  and no credentials only.

View 3 Replies View Related

SQL Server 2014 :: Can Get User Windows Login When Using Server Login Authentication

Apr 26, 2015

Oracle and Teradata are able to capture the windows/client login that connects to their database with a functionnal ID.I've searched around and I don't think MS SQL can do this...I administer SQL 2014 server and also SAS Enterprise guide product. I've created sql server logins for several teams so everyone shares the same sql server login which is used to bind the SAS library to my SQL server database.

However, when looking at activity monitor, I can't drill down to which user is executing a particular query. I only see the SQL login which is share amongs 200 other folks.On the other hand, when they connect from SAS to Oracle or Teradata, I can see the shared login + additionally their windows NT login used to connect to SAS which is awesome....they can't fool me by using a shared/funcionnal ID....i still see who's using that ID...

View 2 Replies View Related

No Login Windows For DB

Jan 19, 2007

Greetings,
One of the DBs on my mssql server should ask for a login and password to change content. The content/DB is access via web page. Any suggestions as to why it has suddenly stopped challenging the user for login? I checked the services and all the necessary ones seems to be running.:confused:

Thanks in advance.
spdunne

View 1 Replies View Related

Drop Windows Login

Jun 22, 2007

I've got a Windows login, which I cannot drop. I have checked about everything I can think of and can't find a connection to this user. Is there a script which anyone has which will list all object referencing this users? SQL 2005 ENT x64. It's a windows domain user.

View 1 Replies View Related

SQL 2005 Login With Windows Accounts

Dec 19, 2006

Hello,
I'm having a problem using Windows Accounts to login to a SQL 2005 Server.
Here is my setup. The SQL server and web server are separate machines. I'm also not developing directly on the web server.
SQL Server - Windows 2003 Server- SQL 2005- Set to use SQL and Windows AuthenticationWeb Server- Windows 2003 Server- IIS 6.0   - Anonymous Authentication is disabled   - Integrated Windows Authentication is enabledApplication web.config:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><appSettings>   <add key="ETR_Environment" value="Dev"/></appSettings>
<connectionStrings>   <add connectionString="Data Source=sql-dev-server, 1179;Initial Catalog=ENV_ETR;Integrated Security=SSPI;" name="ETR_Dev"/>   <add connectionString="" name="ETR_Prod"/></connectionStrings>
<system.web>   <compilation debug="true" strict="false" explicit="true"/>   <pages>      <namespaces>         <clear/>         <add namespace="System"/>         <add namespace="System.Collections"/>         <add namespace="System.Collections.Specialized"/>         <add namespace="System.Configuration"/>         <add namespace="System.Text"/>         <add namespace="System.Text.RegularExpressions"/>         <add namespace="System.Web"/>         <add namespace="System.Web.Caching"/>         <add namespace="System.Web.SessionState"/>         <add namespace="System.Web.Security"/>         <add namespace="System.Web.Profile"/>         <add namespace="System.Web.UI"/>         <add namespace="System.Web.UI.WebControls"/>         <add namespace="System.Web.UI.WebControls.WebParts"/>         <add namespace="System.Web.UI.HtmlControls"/>      </namespaces>   </pages>
  <authentication mode="Windows"></authentication>  <customErrors mode="Off"></customErrors>  <authorization>     <allow users="XXXWilliam.Klein"/>     <deny users="*"/>  </authorization></system.web></configuration>
The reason why I want to use the windows login to connect to the database is the application needs to keep track of who did what when entering and updating data but still keep them using there windows login accounts. So using a generic account will not work.
What keeps happening is I keep getting this error: Login failed for user 'NT AUTHORITYANONYMOUS LOGON'. When trying to connect the database. I've tried this on two web servers on another I get something slightly different: Login failed for user 'XXXWeb-Server$'.
Anybody able to give me any suggestions on how to fix this?

View 12 Replies View Related

Windows Authentication Login Permissions

Feb 18, 2002

Hi,

I have created a Windows user login and have granted it the appropriate roles (including a revoke).
As a test I also created a standard user and gave it the same roles as above.
When I run a query against the revoked table, the results are unexpected.
The Windows user can run the query, and the standard user gets a permissions error (which is what i expect).

Does anyone have any ideas as to what is happening here? I am still confused.... Does it have anything to do with the public permission that much be granted?

Thanks

View 1 Replies View Related

Creating Login In Sql 7 On Windows 2000

Sep 26, 2002

Hi

My platform is mainly windows nt4 server with two windows 2000 member servers. We recently acquired a higher spec machine to replace the old sql 7 server that is on windows NT4 box. The new server is a windows 2000 box and I have installed sql 7 on it.

The problem is when I try to create a new login it does not give me the option to select my domain. When I select new login and go for windows nt4 authentication the drop arrow for Domain only has the server name and not the domain name. If I manually input the domain name it rejects it.

I do not have Active Directory or a local dns server running on my network as we have no intention of migrating to Win2000 until next year. Our internet service provider handles our dns issues.

Is it not possible to install sql7 on win2k box.

Thanks
Eve

View 4 Replies View Related

How To Create A Windows Authentication Login

Jan 16, 2007

Is it possible to create a windows authentication login for each of the computers on my network that will connect to sql server. I am developing a program that will be installed on multiple computers and we do not want to actually have to log in to sql server since we will have to log in to the server before opening the program and we dont want to have 2 logins. I would like to use windows authentication so that I do not have to program multiple connection strings in my program so that if more than 1 person accesses the database at the same time it will not cause a problem with using the same login. Is this possible and if so how would I go about setting up the logins. I am using SQL Server 2005 and XP SP2

View 8 Replies View Related

How To Discover Either Windows Group Or SQL Login

Jul 20, 2005

Hello,I am putting together a row level security plan for our salesdatabase. I will give a brief description of the method I am thinkingof using to give you an idea of how I will need to be able to discoverthe group or login the user is using to access the data.I have a table called salesfact, it has all the sales info for all thebranches of our company. Each order(row) that is inserted has an entryin the division_number column to describe which branch the orderbelongs to. I have created another table(Branch_Folks) that has fourcolumns; username, windows_group, SQL_Login and division_number.I am using a view and SQL logins to control access to the data basedon the user, the SQL logins give windows groups access to the view.Only users that are added to the specific branch groups will haveaccess to the logins, but if a user is added to the group without mebeing notified, then he will not have a corresponding entry in theBranch_Folks table. Currently I am using the SUSER_SNAME() function todetermine which user is accessing the data from the view that I havecreated. The view uses this select statement to filter the data basedon the user & division.Select * from tsalesfact A, Branch_Folks B where SUSER_SNAME() =B.username and A.division_number = b.division_numberThis method works fine, but I will have to manually maintain the userlist in the Branch_Folks table in case a new user joins the windowsbranch group. I would like to use a function similar to SUSER_SNAME()that can determine the windows group or SQL Login a user is using.Does anyone know of a way to do this??Thanks a ton,Tim

View 1 Replies View Related

Creating A Windows Athentication Login

May 3, 2006

Hi all. Here is my problem. Computer A has sql server 2005 express installed on it together with sql management studio. Computer B has only sql management studio. Computers are members of a corporate domain and are running xp professional. After starting management studio on computer B the databese engin on computer A is visible in the 'select server to connect to' dialog under network servers. When i try to connect i get the message login failed - so i try to add a windows athentication login for the appropriate user on computer A. The problem is as follows: Under 'Create new login/Select user or group/location' no network location apear and i can not add a network user name. This seem to be a network connectivity issue. I have, however, adjusted network connectivity via surface area configuration and enabled tcp/ip and named pipes - the server is visible form another computer as i have prviously mentioned.

View 1 Replies View Related

Login Windows Authentication Problem

Mar 17, 2006

Hi,

I have a problem with sql server 2005 express, when i try to connect to an sql database it says login: is not a trusted connection to an sql database. I have gone into reg edit and changed the authentication setting from windows oly mode 1 to mixed mode 2. It still has the same problem, does anyone have any idea what the problem may be?

kind regards

Chris J

View 1 Replies View Related

Login Failed From Windows Service

Dec 1, 2006

I'm building a Windows Service which keeps getting denied access to SQL Server 2k. The Service operates as a System User rather than an individual user profile.

I've tried Trusted_Connection=yes and Integrated Security=SSPI but these are both denied.

Any ideas what the connection string to connect to SQL Server 2k from a Wndows Service is?

View 4 Replies View Related

Cannot Remotely Login To SQL Express Since Last Windows Update

Nov 17, 2006

Since today (after installing the latest Windows Updates !on my local machine!) I cannot login to a SQLExpress instance remotely; stating that it cannot find the server/instance.


The weird thing is: it only happens when I want to login to the non-default instance (sqlexpress 2005) (<IP><instance>).

When i'm using the default instance (msde 2000 or sqlexpress 2005 on another machine) (<IP>) it seems to work fine.


Does this have something to do with the windows updates, or is it just a coincedence?

Thanks in advance,

Remco Ros

View 4 Replies View Related

Permissions Not Effective For Windows Authentication Login

Jul 7, 2007

Hello All,



I'm hoping someone can help me with this puzzle.



Most logins I've created have been SQL Server authenticated. I assign the login newEmployee to a role existingRole, and ensure the role has the required permissions. This didn't seem to be rocket science....



My company has been provided with an application with a SQL Server back-end. My instructions were to create a Windows authenticated login and give it full access to the database. I followed the above principles, but running the application, the user got the error -



SELECT permission denied on object 'sysobjects', database 'databasename', owner 'dbo'.



So I decided to try the simplest possible scenario to make it work:



I've created a login DOMAINewEmployee with Windows authentication.

DOMAINewEmployee has been granted access to databasename.

By default, DOMAINewEmployee is a member of Public.

Public has been granted all available permissions on all objects.



ie... grant all on userTables to public

........grant all on sysobjects to public

........grant all on otherSystemTables to public

etc.





Running the application, the user still gets the above error. I'd send the problem back to the vendor, except if I've logged onto the PC as DOMAINewEmployee, querying -



select * from dbo.sysobjects



via Query Analyser produces the same error message. (An equivalent error message is produced when querying a user-created table).





To compare, I then created a login newEmployee2 with SQL Server authentication.

newEmployee2 has been granted access to databasename.



select * from dbo.sysobjects



runs successfully from Query Analyser (as to any queries on user-created tables).





What else is required to grant access to tables from a Windows authenticated login?







( What really scares me, is that the application will run if I make the Windows authenticated login a member of server roles System Administrator and Database Creators, then the application will run - but I don't want this to be the permanent solution. Even after doing this, the above query still fails in Query Analyser for that login, suggesting that there is something wrong with how I configured the permissions. )





Any help would be appreciated.





Thanks.



Kim.

View 4 Replies View Related

SQL Security :: Login Failures For Windows Accounts

Aug 12, 2015

We are seeing login failures for windows accounts. Below is the error message.

Description:  In our env most logins are windows accounts. Initially we thought it is an UAC issue and we tried to launch the SSMS using "Run as Administrator". However, we are seeing login failures.

Enviroment:
Microsoft SQL Server 2014 - 12.0.2402.0 (X64)
RTM Enterprise Edition (HyperVisor)

Error Message in Error Log :

2015-08-10 22:36:45.290 Logon        Error: 18456, Severity: 14, State: 11.
2015-08-10 22:36:45.290 Logon        Login failed for user 'domainloginname'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: 10.xxx.xxx.xxx]
2015-08-10 22:41:23.470 Logon        Error: 18456, Severity: 14, State: 11.
2015-08-10 22:41:23.470 Logon        Login failed for user 'domainloginname'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: 10.xxx.xxx.xxx]

Troubleshooting done:
- Recreated the windows login in sql server. Doesn't work.
- ran sp_valdidatelogins. it doesn't return any rows.
- I belong to sysadmin role and when I say, getting below error message.

xp_logininfo 'domainloginname'
/*
Msg 15404, Level 16, State 19, Procedure xp_logininfo, Line 64
Could not obtain information about Windows NT group/user 'domainloginname', error code 0x5.
*/

We tried dropping this account and re-creating the windows account with same permissions but still result is same.It throws same error message. Login failure message !!!

View 18 Replies View Related

Cannot Get CREATE LOGIN From A Windows Group To Work

Jan 28, 2007

I have created a database fronted by an ASP.Net application. It's all nice and simple, and I only need a very simple level of security (and even that is only as a protection against accidents rather than maliciousness). My intention is that users connect using Windows impersonation (<identity="true">), with the database creator having full access and the public group (I'm talking SQL groups here) having specific premissions granted on specific tables.

If I set <identity="false"> on my XP box the application connects to the database as [MACHINEASPNET]. This is easy to set up access for - I simply do a

CREATE LOGIN [MACHINEASPNET] FROM WINDOWS

and then within the actual database do a

CREATE USER [MACHINEASPNET]

But as I said, I want to use Windows impersonation. When I set <identity="true">, the application correctly attempts to connect as the actual Windows user account (e.g. [MACHINE estuser]). If that user is the user who installed the database, then all is well and it has full access. For anything else, I get a "cannot log on" error - this much I expect.

So I want to permit logins for all other users, and I want this to work regardless of whether the machine is a standalone machine whose "domain" is simply the machine's own name, whether it is in some form of traditional peer-to-peer workgroup, or whether the machine is connected to a real domain. I also want it to work on XP and Windows Server 2003 (and ideally Vista also, but that can wait). When I try the following:

CREATE LOGIN [MACHINEUsers] FROM WINDOWS

I get this error:

Msg 15401, Level 16, State 1, Server MACHINESQLEXPRESS, Line 1
Windows NT user or group 'MACHINEUsers' not found. Check the name again.

Nor does it work with [Everyone] (that one has no domain/folder listed against it in any permissions dialogs on my domainless development PC). So I'm stuck and confused. It's taken me ages just to get this far. Any suggestions anyone?

Thanks in advance.

View 8 Replies View Related

SQL Login Windows Authentication Error: 18456

Feb 9, 2008

Hi,
I have just installed Windows Vista and SQL Server 2005. When I try to connect to my local server with Windows Authentication, I get the follwoing message:

Login failed for user <user> (Microsoft SQL Server, error: 18456)

Any help please. Thanks.

View 1 Replies View Related

How To Change What LOGIN Is Mapped To A Db USER (windows Not SQL)

Aug 17, 2007



Is there a form of ALTER USER or other option that would allow me to change the Windows-based login associated with a user account?

According to BOL, I cannot use the sp_change_users_login trick since I want to rewire up to a Windows login, not a SQL Server login.

-- Margo

View 1 Replies View Related

How To: Authenticate Trusted Logins Without Login In And Out Of Windows.

Feb 4, 2008

I€™m working on an application that needs to support multiple users without log in and out of Windows. I would like to use trusted/integrated security (domainusername) so I.T. does not have to manage two accounts per operator. Is it possible to use trusted accounts (domainusername) in the SQLClient.Connection object?

Thanks!
Sean

View 8 Replies View Related

Is Windows Login Name Case Sensitive In SQL Server 2000?

Sep 12, 2006

Is Windows Login Name Case Sensitive in SQL Server 2000?

View 1 Replies View Related

Use Windows Group As Local Login For Linked Server?

Mar 12, 2008

Hi all:

I have created a linked server that connects a SQL 2000 database to a SQL 2005 database. If I use individual SQL or Windows accounts as local logins on the SQL 2000 instance, I can successfully query the linked SQL 2005 database.
(For security we use the setting "For a login not defined in the list above, connections will: not be made")

If I try to use a Windows group as the local login, remote queries fail with the error
"Access to the remote server is denied because no login-mapping exists"

Is it not possible to use a Windows group for the local login of a linked server?

If I run 'exec sp_linkedservers' the setup appears valid

Linked Server Local Login Is Self Mapping Remote Login
SQL2005Serv DomainBRubble 0 SQL_Read_Access
SQL2005Serv DomainWindows_Group 0 SQL_Read_Access
SQL2005Serv DomainFFlintstone 0 SQL_Read_Access

Thanks in advance
Grant




View 5 Replies View Related

SQL Security :: Windows Authentication Login Is Created Automatically In DB

Apr 24, 2015

In my DB (SQL 2012) one windows authentication is created automatically and a schema is created exactly automatically that this user is owner of this schema. (e.g the user is domainx and schema exactly domainx).

I created a DDL Trigger on my DB to find out who and how it is created , but I didn't get any useful information.

I change the owner of schema that I can delete the schema and after that delete the user, and sometimes because the user is owner of a service , I have to alter the owner of the service to DBO and delete the user , but again and again exactly this user and schema (e.g domaninx ) are created as soon as I delete it.

I have read these topics : [URL] .... and [URL] .... but can't solve my problem.

View 10 Replies View Related

Cannot Connect To Localhost Using Windows Security Group As Login

Feb 19, 2007

I have a test environment set up at home with a small windows server 2003 Active Directory domain. I created a windows security group on the dc and added myself and another user to the group. I then use this group as a login for SQL Server and add the login to the sysadmin server role. This works exactly as I would expect on the Windows Server computer (which is also the Domain Controller) regardless of which computer I use to connect to this Windows Server computer. However, when I set up the exact same login on the local sql server instance of my client laptop running windows xp pro, the I get an error message (Login failed for user MYDOMAINdgolds...) when I attempt to connect to the local instance of SQL server, even though I am able to connect to the instance on the domain controller with no problems using this same client laptop under the same user account. The only way I am able to connect locally on the laptop under this account (which does not have local admin privileges on any box, for testing purposes) is to add the user account separately as a login, rather than as part of a group. I'm curious as to why being a member of a security group that is part of the sysadmin server role does not allow me to connect to the local instance of SQL Server on this client laptop. The windows server computer is running SQL2k5 Enterprise, and the client laptop is running SQL2k5 developer. Any insight into this would be appreciated.

Thanks,

Dave

View 12 Replies View Related

Windows App Cannot Access SQL Server Express DB (login Failure)

Jul 6, 2007

I am using an unattended install script to install the database on the client machine. All the settings look correct. But my application cannot access the db -



Error: Cannot open database requested by the login.



Now when I install SQL Server Express manually, it works fine. I have the service running under local system and enabled user instances is true. I cannot figure out the problem(been working on it for 2 days).



Any ideas?



View 1 Replies View Related

Can Report Results Be Filtered By Windows User Login?

May 2, 2007

Good morning,



I'm in the process of creating a report to show employees and managers holiday and absence information. Is there a way of filtering the results of the report based on who is running the report, so that employees could only see their own information and managers could only see theirs and their subordinates information?



What I was hoping to do was create a lookup table which cross-references Windows logins with employee numbers and then use this information to pass a parameter to the SQL query, but I don't know how to retrieve the login from the machine being used to view the report.



I've heard about row level security and it seems ideal in theory but I fear the implimentation of row level security would be far beyond my meagre knowledge.



Any constructive suggestions welcomed.



Thanks,



Paul

View 3 Replies View Related

Login Failed For The User (using Windows Integrated Security)

Aug 1, 2006

Hello Everyone,

I am trying to connect SQL database through code but I get this error,I have spent days to solve it but unfortunately I couldn't...Here is my code in VB express(OP:windows 2000 with SP4)I am new to VB,so it makes the situation more difficult for me.

my code is:

Public Class Form1



Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim conn1 As SqlConnection = _

New SqlConnection("Data Source=.SQLEXPRESS;" & _

"Integrated Security=SSPI;" & _

"database=deneme3_database;")

'Open connection

conn1.Open()

MessageBox.Show("Connection succeeded.")

'Close connection

conn1.Close()

MessageBox.Show("Connection closed.")

End Sub



The error message is,it is in german but it is clear I guess:)

" Die von der Anmeldung angeforderte "deneme3_database"-Datenbank kann nicht geöffnet werden. Fehler bei der Anmeldung.
Fehler bei der Anmeldung für den Benutzer 'ADPLANatalay'. "





Thank you in advance!



Can



View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved