Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   ADO Connection String. (http://www.go4expert.com/forums/ado-connection-string-t19116/)

ForexSurfr 21Aug2009 09:25

ADO Connection String.
2 Attachment(s)
I am currently having problems with my ADO connection string. I have searched all over the internet for a solution to this problem but I have yet to find a solution. Can someone help me with the proper configuration for a SQL OLEDB connection with a windows authentication? I have attached my C++ code file and a printscreen of my SQL Server Express signon screen.

shabbir 21Aug2009 09:59

Re: ADO Connection String.
Instead of attaching your problem try posting them as that becomes easier for us to look at

ForexSurfr 21Aug2009 10:08

Re: ADO Connection String.
The following is an error message I am receiving:

Error number: 80040e4d Login failed for user 'mcertini'.
Code = 80040e4d
Code meaning = I
Source = Microsoft OLE DB Provider for SQL Server

naimish 21Aug2009 10:56

Re: ADO Connection String.
Try using below sample code :


conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data1\Data1.mdb;"

ForexSurfr 21Aug2009 11:34

Re: ADO Connection String.

Thank you for your reply. Listed below is the message I get when I eliminate all of the arguments other than the "Provider" and "Data Source" and modify these to your recommendation.

Error number: 80004005 Unrecognized database format 'C:\SQL Server 2000 Sample
Code = 80004005
Code meaning = U
Source = Microsoft JET Database Engine

Listed below is the message I get when I retain all of the original arguments and modify the arguments you specified:

Error number: 80040e21 Multiple-step OLE DB operation generated errors. Check e
ach OLE DB status value, if available. No work was done.
Code = 80040e21
Code meaning = I
Source = Microsoft OLE DB Service Components

xpi0t0s 21Aug2009 12:06

Re: ADO Connection String.
Try not using quotes, i.e.

pConnection1->ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;...(etc)";

naimish 21Aug2009 12:17

Re: ADO Connection String.

Unrecognized database format
This error only comes when there is some dependency.

The solution I was using it, try to convert your database in 97 format, it ll get closed.


nimesh 23Aug2009 02:50

Re: ADO Connection String.
The Connection String Reference: http://www.connectionstrings.com/

All times are GMT +5.5. The time now is 02:28.