Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,459 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,824 people online right now. Registration is fast and FREE... Join Now!




Connection to Database

 
Reply to this topicStart new topic

Connection to Database

masipro
24 Jul, 2008 - 08:52 PM
Post #1

New D.I.C Head
*

Joined: 8 Jul, 2008
Posts: 39

smile.gif 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
User is offlineProfile CardPM
+Quote Post

Ricendithas
RE: Connection To Database
24 Jul, 2008 - 09:19 PM
Post #2

New D.I.C Head
*

Joined: 12 Jul, 2008
Posts: 34


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

smile.gif 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



If I'm not mistaken, you can also use MySQL Server. It is much better than MS Access. I think it uses this driver:

DRIVER={MySQL ODBC 3.51 Driver};
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Connection To Database
24 Jul, 2008 - 09:21 PM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,993



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Go to ConnectionStrings.com, they have the connection string for just about every database system file on the planet right at your finger tips smile.gif
User is offlineProfile CardPM
+Quote Post

tope10
RE: Connection To Database
25 Jul, 2008 - 12:05 AM
Post #4

New D.I.C Head
*

Joined: 25 Jun, 2008
Posts: 22



Thanked: 2 times
My Contributions
QUOTE(masipro @ 24 Jul, 2008 - 09:52 PM) *

smile.gif 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"

smile.gif




User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:55PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month