database connectivity to oracle by using ado or oledb to vc++ [message #87970] |
Thu, 29 November 2001 18:35 |
Venu
Messages: 44 Registered: September 1999
|
Member |
|
|
I need a sample code to the database connectivity to oracle by using ado or oledb to vc++ application. we just need to display or insert records in a table thru VC++ front end, and run a stored procedure in the database from frontend. thanks in advance..
----------------------------------------------------------------------
|
|
|
|
Re: database connectivity to oracle by using ado or oledb to vc++ [message #88062 is a reply to message #87970] |
Sat, 02 February 2002 01:04 |
Chandru
Messages: 12 Registered: July 2000
|
Junior Member |
|
|
you can use following snipts
your connectionstring should be
//Oracle Connection using DSN---All are possible use any one
CString ConnectionString;
1)ConnectionString= "PROVIDER=MSDASQL;DSN=dsn name;UID=scott;PWD=tiger;";
2)ConnectionString="DSN=dsn name;UID=scott;PWD=tiger;";
3)ConnectionString="DATA SOURCE =DSN name;USER ID=scott;PASSWORD=tiger";
4)ConnectionString="PROVIDER=MSDASQL;DATA SOURCE=DSN Name;USER ID=scott;PASSWORD=tiger;" ;
//DSN less connection
5)ConnectionString="PROVIDER=MSDASQL;DRIVER={Microsoft ODBC for Oracle};SERVER=serverName;UID=scott;PWD=tiger;";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|