QUOTE(masipro @ 24 Jul, 2008 - 09:52 PM)


Hai Good day,
I am using VB 6.0, though i have seen connections to Database in codings I want more detail about connections. Please explain the following
1. Please let me know what are ( some eg.,) the database are using while using vb. and how it is connected through coding (Provider), let me the appropriate provider Name.
Using MS Access as back end , provider used for this is (as I know) 'Provider=Microsoft.Jet.OLEDB.4.0' and also i have seen in some other programs using 'Provider=MSDASQL.1'. what are the difference between them . Hence I wish to know is there any other PROVIDER available to use?.
1)MSAccess = Provider = Microsoft.Jet.OLEDB.4.0' and MSDASQL.1
2) SQL = Provider ?
3) ? = Provider ?
4).......
Thanks
Masipro
The provider that you are going to supply is depend on what DBMS software you use, since you use a Microsoft Access so you are going to supply the provider that you stated.
Regarding to the connection you can create connection in different ways.
example:
dim cn as New Adodb.Connection
cn.Open "DSN=[name]"
' this connection is used when you create a DSN in the DataSource (ODBC) that can find in control panel
another way of creating connection is by setting the provider and supplyng the filename in the open method.
dim cn as New ADODB.Connection
cn.Provider = "Microsoft.Jet.oledb.4.0"
cn.open "[location of the database"