|
-
April 29th, 1999, 09:40 AM
#1
ODBC
Hello, I'm using CDatabase and CRecordset classes to access to an Oracle DataBase. I have created on the Windows Control Panel a new DSN called "SYSDD".
In the application I have the member CDatabase m_DBDescw
to access to the database I would like to know if it's right the following set of statements:
if(m_DBDescw.IsOpen())
return true;
try
{
m_DBDescw.OpenEx("DSN=SYSDD;UID=UserId;PWD=Password");
}
catch(..)
.....
The userId and Password to specify are those of the DB I want to use?
If yes, Could you possibly give me some clues on why it doesn't work?
Thank you for your attention!!!! Nicola
-
May 5th, 1999, 09:52 PM
#2
Re: ODBC
you may add the database phase,like this:
m_DBDescw.OpenEx("DSN=SYSDD;UID=UserId;PWD=Password;Database=???");
-
May 6th, 1999, 08:19 AM
#3
Re: ODBC
What is the error? Problem may be that you don't have the DSN/SERVER defined, Oracle client is not configured, etc. You can also add the SERVER name to the Open string if necessary.
-
May 6th, 1999, 02:12 PM
#4
Re: ODBC
Email a description of the exception returned. I have experience with DAO/ODBC.
Freedom is knowing you can burn all your software without losing a minute's sleep.
-
May 12th, 1999, 05:30 AM
#5
Re: ODBC
You should try by adding the word "ODBC" in the string for the OpenEx function.
Of course, the userId and the password are the database one.
Also, verify that you have the right to connect to the server, if you are using a network. You can map a server drive then try your program.
Stephane BOUDOU.
-
May 12th, 1999, 11:04 AM
#6
Re: ODBC
try this
m_DBDescw.OpenEx( _T("DSN=SYSDD;UID=UserId;PWD=Password") ) ;
and still get the problem send me u r code
[email protected]
mahesh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|