Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > MySQL > connection string

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-03-02, 07:14
kalyan_sekhar1 kalyan_sekhar1 is offline
Registered User
 
Join Date: Jul 2002
Location: vizag
Posts: 11
Smile connection string

hi to all,

when i try to create connection string to connect mysql from vb it is giving error "object required" ..
this is the code tht i used

ConStr.open "Driver={mySQL ODBC 3.51 Driver}; Server=11.148.431.217;Database=test;Uid=root;Pwd=; "

i am able to connect thru DSN..

so please provide me the solution how to coonect thru connection string

kalyan sekhar
Reply With Quote
  #2 (permalink)  
Old 12-03-02, 09:19
Bruce A. Baasch Bruce A. Baasch is offline
Registered User
 
Join Date: Nov 2002
Location: Ohio
Posts: 90
It doesn't sound like you initialized Constr before using it:

Set Constr = New Connection

Good Luck,
__________________
Bruce Baasch
Reply With Quote
  #3 (permalink)  
Old 12-03-02, 17:42
hellur hellur is offline
Registered User
 
Join Date: Nov 2002
Posts: 10
Re: connection string

strConnect = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=localhost;" & " DATABASE=nameofdatabase;"_
& "UID=name;PWD=password; OPTION=16384"
Set dbcon = Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.recordset")
dbcon.open strConnect

sql="select * from sometablename"
rs.open sql,dbcon,1,2
rs.close

Well this will work I think work fine nice for me!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On