Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%
Option Explicit
Dim oConn, oRecordset1, oRecordset2, sConn, sFilePath
Set oConn = Server.CreateObject("ADODB.Connection")
sFilePath = Server.MapPath("mydatabase.mdb")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sFilePath & ";"
oConn.Open sConn
Set oRecordset1 = oConn.Execute("SELECT col FROM tTable1;")
Set oRecordset2 = oConn.Execute("SELECT col FROM tTable2;")
If Not oRecordset1.EOF Then
Response.Write "SQL 1 result: "
Do While Not oRecordset1.EOF
Response.Write oRecordset1("col") & "<br>"
oRecordset1.MoveNext
Loop
End If
Response.Write "<hr>"
If Not oRecordset2.EOF Then
Response.Write "SQL 2 result: "
Do While Not oRecordset2.EOF
Response.Write oRecordset2("col") & "<br>"
oRecordset2.MoveNext
Loop
End If
%>
<%Session("sessUserName")=Request.Form("username")%>
<%=Response.Write("Welcome ")%>
<%=Response.Write(Session("sessUserName"))%>
<%=Response.Write("<br>")%>
<%
Dim Con, sql, Rec1, Rec2
set Con = Server.CreateObject("ADODB.Connection")
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/logins.mdb")
UserID = Session("sessUserName")
'Select the record matching the username.
Set Rec1 = Con.Execute("SELECT * FROM cust_logins WHERE [USERNAME]= '"& UserID &"' ")
Set Rec2 = Con.Execute("SELECT * FROM cust_inventory WHERE [CustID] = '" & UserID & "' ")
'SQL = "SELECT * FROM cust_logins WHERE [USERNAME]= '"& UserID &"' "
set Rec1=Con.execute(sql)
Do While Not Rec1.EOF
Response.Write("<b>Customer ID:</b>")
Response.Write(rec("CustID"))
Response.Write("<br>")
Response.Write("<b>Customer Name:</b>")
Response.Write(rec("CustName"))
Response.Write("<br>")
Response.Write("<b>Customer Address:</b>")
Response.Write(rec("Address"))
Response.Write("<br>")
Response.Write("<b>City:</b>")
Response.Write(rec("City"))
Response.Write("<br>")
Response.Write("<b>State:</b>")
Response.Write(rec("State"))
Response.Write("<br>")
Response.Write("<b>Zip:</b>")
Response.Write(rec("Zip"))
Response.Write("<br>")
Response.Write("<b>Email:</b>")
Response.Write(rec("email"))
Response.Write("<br>")
Response.Write("<a href=editprofile.asp?customer=" & UserID & ">")
Response.Write("Edit Profile")
Response.Write("</a>")
Rec1.MoveNext
Loop
%>
<%
Set Rec2=Con.execute(sql)
Response.Write("<table border=1><tr><th>Pic</th><th>ListingID</th><th>STK</th><th>YR</th><th>Make</th><th>Model</th></tr>")
Do While Not Rec2.EOF
Response.Write("<tr>")
For x=0 to rec.Fields.Count-1
Response.Write("<td>")
Response.Write(rec(x))
Response.Write("</td>")
Next
Response.Write("</tr>")
rec.Movenext
Loop
Response.Write("</table>")
Response.Write("<br>")
Rec2.Close
Con.Close
%>
Set Rec2 = Con.Execute("SELECT * FROM cust_inventory WHERE [USERNAME] = '" & UserID & "' ")
set Rec1=Con.execute(sql)
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/logins.mdb")
Set Rec2 = Con.Execute("SELECT * FROM cust_inventory WHERE [CustID] = '" & UserID & "' ")
Set Rec2 = Con.Execute("SELECT * FROM cust_inventory WHERE [CustID] = " & [COLOR=red]CustID_Variable[/color])
Set Rec1 = sConn.Execute("SELECT * FROM cust_logins WHERE [USERNAME]= '"& UserID &"' ")
Set Rec2 = sConn.Execute("SELECT * FROM cust_inventory WHERE [USERNAME] = '" & UserID & "' ")
Dim oConn, Rec1, Rec2, sConn, sFilePath
Set oConn = Server.CreateObject("ADODB.Connection")
sFilePath = Server.MapPath("db/logins.mdb")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sFilePath & ";"
oConn.Open sConn
UserID = Session("sessUserName")
set Rec1=sConn.execute(sql)
Do While Not Rec1.EOF
Set Rec1 = sConn.Execute("SELECT * FROM cust_logins WHERE [USERNAME]= '"& UserID &"' ")
[COLOR=red]s[/color]Conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sFilePath & ";"
If Not oRecordset1.EOF Then
Response.Write "SQL 1 result: "
Do While Not oRecordset1.EOF
Response.Write oRecordset1("col") & "<br>"
oRecordset1.MoveNext
Loop
End If
Response.Write "<hr>"
If Not oRecordset2.EOF Then
Response.Write "SQL 2 result: "
Do While Not oRecordset2.EOF
Response.Write oRecordset2("col") & "<br>"
oRecordset2.MoveNext
Loop
End If
Dim oConn, Rec1, Rec2, sConn, sFilePath
Set oConn = Server.CreateObject("ADODB.Connection")
sFilePath = Server.MapPath("db/logins.mdb")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sFilePath & ";"
oConn.Open sConn
UserID = Session("sessUserName")
set Rec1=[COLOR=red]o[/color]Conn.execute(sql)
Do While Not Rec1.EOF
set Rec1=oConn.execute(sql)