How to Connect Database via System DSN using VB6

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
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"

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
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Copyright @ Codes-47.Blogspot.Com. Powered by Blogger.