Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to connect My SQL
#1
Please tell me how to connect to mysql
Reply
#2
Hi Kandula,

Since elements (links, data etc) on web page sometime are floating, so we need to select from database.

Here I have made a paragraph of statement for DB connection and data selecting, and I have successfully connected with WEBDEV database. FYI.



****************************************************************************************

Code:
Set Conn = CreateObject("ADODB.Connection" ) str="DRIVER={MySQL ODBC 3.51 Driver};SERVER=webdev;DATABASE=intranet;user id=root ; password=xxxxx" Conn.open str Set Rs = CreateObject ("ADODB.Recordset" ) sql = "select * from `user`;" Rs.open sql,conn,1,3 If (not Rs.eof) then Rs.MoveFirst ' show the first piece of record from user table' MsgBox Rs(0) MsgBox Rs(1) MsgBox Rs(2) MsgBox Rs(3) MsgBox Rs(4) MsgBox Rs(5) MsgBox Rs(6) end if Rs.close Set Rs = Nothing Conn.close Set Conn = Nothing
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Connect to IBM MQ using UFT 12.5 soumen 2 5,174 03-17-2016, 11:16 AM
Last Post: vinod123
  DB2 Connect connection with IE 11 SRP 1 3,073 12-18-2015, 12:41 PM
Last Post: vinod123
  Exe invoked through UFT is unable to access IIS and SQL Server service bkdevise 0 2,588 08-25-2015, 05:49 PM
Last Post: bkdevise
  “Cannot connect to 8822 (connection timed out)" Ikbal 0 2,502 12-08-2014, 11:38 PM
Last Post: Ikbal
  How to connect two web element objects? zawarepradeep@gmail.com 1 3,092 07-23-2014, 11:23 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)