I am starting to write an application in VB6 that connects to SQL Server .
I open the database with this code:
My question is : how can I open the database in my first form, and keep it open ??
(If I define the object 'objconn' in a .bas file, then it is not recognized in my first form, it only works when I define this object in my first form itself)
Any ideas ??
---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
I open the database with this code:
Code:
Dim objconn as new ADODB.Connection
"Driver=SQL Server;Server=SQLServer1;Database=Name_of_Database"
My question is : how can I open the database in my first form, and keep it open ??
(If I define the object 'objconn' in a .bas file, then it is not recognized in my first form, it only works when I define this object in my first form itself)
Any ideas ??
---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !