I created a MySql data file and named it "MyDB".
I added a "MyODBC" driver to my Win98 ODBC.
I added System DNS to my Win98 ODBC with the following details:
Data Source Name = MyDB
Host/Server Name = localhost (this isn't my stand alone conputer's name. I signed a Dynamic IP in my TCP/IP protocol so i thought i should call my host "localhost", is that a mistake ?).
Data Source Name = MyDB
User = Root
Password = MyPassword
I added "Root" user and "MyPassword" as password because i had to write something there. I never added a user named "Root" with a password "MyPassword" anywhere else. Am i supposed to do that ? Where? How ?
I created a web page to show the data located in my MySql data file "MyDB" as follows:
<%@ Language=VBScript %>
<HEAD>
<"META HTTP.EQUIV="Expires"CONTENT"="0>
<HEAD/>
<%
'Variable Declaration
Dim rsCustomers 'ADO Recordset
Dim mConn 'ADO Connection
Dim mCmd 'ADO Command
Dim vRecordCount 'Counter
Dim vbgcolor 'BackGround Color
'Creating the ADO objects
Set mConn = Server.CreateObject("ADODB.Connection")
Set mCmd = Server.CreateObject("ADODB.Command")
Set rsrCustomers = Server.CreateObject("ADODB.Recordset")
'Setting the connection parameters
mConn.CommandTimeout = 40
nConn.CursorLocation = 1 'Client Side
mConn.ConnectionString = "server=localhost;driver=MySQL;db=MyDB;uid=root;pwd=MyPassword"
mConn.open
mCmd.ActiveConnection = mConn
mCmd.CommandType = 1 'Text
mCmd.CommandText = "SELECT * FROM MyTable"
'Opening the record set based on the query from mCmd
rstCustomer.Open mCmd,,1,1
'Walk through the recordset
Do Until rstCustomers.EOF
Response.Write rstCustomers.Fields("FieldName")
rstestomers.MoveNext
Loop
mConn.Close
%>
I run this ASP code but nothing shows up ?
Can anyone help me by telling me W H Y ?!!!
I'll be so gratefull and relieved !
Thanks !
%>