Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling SQL Server stored procedures 1

Status
Not open for further replies.

Katy44

Technical User
Dec 12, 2003
723
0
0
GB
I hope this is the right forum, sorry if it isn't.

I have an Access (2000) form that calls SQL Server (2000) stored procedures. I pass in the connection string:

sqlConn.Open "DATA SOURCE =OurServer; USER=sa PASSWORD=pwd; INITIAL CATALOG=DatabaseName"

and this works fine

When I try to use integrated security instead:

sqlConn.Open "Data Source=OurServer; Integrated Security=SSPI; Initial Catalog=DatabaseName"

it fails on that line and throws an error:

Run time error '-2147217887 (80040e21)'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done

Is this something to do with trying to use integrated security through Access? Specifically SSPI? I haven't managed to find a lot about it, so any help would be appreciated.
 
I needed to include Microsoft ADO Extension for DLL and Security and "Imports ADOX".

I'm now getting another error, but I think this problem at least has been solved.

 
I find it is easiest to test the connection string using the UDL Wizard.

How to invoke the wizard.
1. use notepad and save an empty file as text on your desktop.
2. change the extention on the txt file to udl. The icon will change to the wizard.
3. walk through the tabs to build the connection.
4. test the connection.
5. open the udl file with notepad and you will see the connection string which can be pasted into your app.
 
cmmrfrds, I have had the same problem again - I searched for the error messgae and found my old post! I tried what you suggested and it worked wonderfully. Thanks very much, and I'm sure I'll be using it again in the future!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top