LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why doesn't work DBNewConnection()

I am working with Oracle and when in the application I did many open and close the DB, some times the SQL fails. My intention is,insted DBConnect use DBNewConnect. The notes tells: this alows to mantain open your connection and you need to call only in this way: ( But doen't work)
hdbc = DBNewConnection();
resCode=DBSetConnectionAttribute(hdbc,ATTR_DB_CONN_CONNECTION_STRING,
"DSN = yourDBNAME");
.....
resCode=DBOpenConnection(hdbc);
/****************************************/
This method doesn't work and I don't know why?
The regular methods that appear in the examples works fine.
Basically the DBNewConnection is accepted but not the
"DBSetConnectionAttribute".
Any clue?
Thanks
Jaime Ponce jaimeponc
e@worldheart.com
0 Kudos
Message 1 of 2
(2,685 Views)
What exactly are you seeing. The DBSetConnectionAttribute is returning an error? The DBNewConnection states that it creates an unopen connection. So you are right to put it before the DBOpenConnection. I don't have Oracle here to test this on. You'll have to give me a little more information.
Thanks.

Dan McChane
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,685 Views)