Microsoft Word - Sam's Teach Yourself MySQL in 21 Days - SAMS.doc

(singke) #1

110 Dim vRecordCount 'Counter


120 Dim vbgcolor ‘Back Ground Color


130 'Creating the ADO Objects


140 Set mConn = Server.CreateObject("ADODB.Connection")


150 Set mCmd = Server.CreateObject("ADODB.Command")


160 Set rstCustomers = Server.CreateObject("ADODB.Recordset")


170 'Setting the connection parameteres


180 mConn.CommandTimeout = 40


190 mConn.CursorLocation = 1 'Client Side


200 mConn.ConnectionString = "server=10.1.1.50;driver=MySQL;" &_


"db=Meet_A_Geek;uid=root;pwd=tacobell"


210 mConn.Open


220 mCmd.ActiveConnection = mConn


230 mCmd.CommandType = 1 'Text


240 mCmd.CommandText = "SELECT * FROM Customers"


250 'Opening the record set based on the Query from mCmd


260 rstCustomers.Open mCmd,,1,1


270%>

280

290

Here is a list of our


300 Customers


310


320