nonprogrammer
Technical User
Hello All,
I am writing a script that requires me to use two different tables so what I did I copied the connection from a script that I had and modified a bit
Code:
<%
'Dimension variables
Dim adoConpoints 'Holds the Database Connection Object
Dim rsGuestbookpoints 'Holds the recordset for the record to be updated
Dim strSQLpoints 'Holds the SQL query for the database
'Holds the record number to be updated
'Read in the record number to be updated
'Create an ADO connection odject
Set adoConpoints = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoConpoints.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("ncaa.mdb")
'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"
'Create an ADO recordset object
Set rsGuestbookpoints = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQLpoints = "SELECT gmpoints.* FROM gmpoints "
'Open the recordset with the SQL query
rsGuestbookpoints.Open strSQLpoints, adoConpoints
%>
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsGuestbook 'Holds the recordset for the record to be updated
Dim strSQL 'Holds the SQL query for the database
Dim lngRecordNo 'Holds the record number to be updated
'Read in the record number to be updated
lngRecordNo = CLng(Request.QueryString("ID"))
'Create an ADO connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("ncaa.mdb")
'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"
'Create an ADO recordset object
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT gm.* FROM gm WHERE ID=" & lngRecordNo
'Open the recordset with the SQL query
rsGuestbook.Open strSQL, adoCon
%>
Code:
<td width="120" rowspan="2" align="center"><%= rsGuestbook ("B1R1G1")%><% if rsGuestbook ("B1RG1") = rsGuestbookpoints ("atlar1g1") then rsGuestbookpoints ("atl1g1p") = "3" %> </td>
I am trying to verify if B1R1G1 is equal to atlar1g1 then insert a number 2 in atl1g1p
when I try this I get an error
Code:
Error Type:
Provider (0x80004005)
Unspecified error
/marchmadness/viewtest.asp, line 17
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
help please!!