Hello guys this single line of codes will show to you on how to connect your database via
System DSN connecting your database is very use-full because you can Easily locate your
database and open it through your VB6 without typing a lot of Code>>>
NOTE
End Sub
For Creating System DSN for MS Access just Click the
link Creating System DSN for MS Access
For Creating System DSN for SQL Server just click the
link Creating System DSN for SQL Server
System DSN connecting your database is very use-full because you can Easily locate your
database and open it through your VB6 without typing a lot of Code>>>
NOTE
Make sure that you Add a Active X data Objects to
build a Database and Record-set Connection Dim Conn As Adodb.Connection
Private Sub Form_Load()
Set Conn=New Adodb.Connection
'for example my system dsn name is Adrian
Conn.Open "Adrian"
For Creating System DSN for MS Access just Click the
link Creating System DSN for MS Access
For Creating System DSN for SQL Server just click the
link Creating System DSN for SQL Server
Tags:
Database,
Visual Basic 6.0
Leave a comment