vans
Programmer
- Apr 23, 2001
- 12
am trying to open a database run a loop through the data, then have an if statement within the first loop that opens a second database and retreives some data.
When I run the code listed below I receive the following
Here is my error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Visual FoxPro Driver]Memo file c:\inetpub\ is missing or is invalid.
/sasixp/grades.asp, line 45
LINE 45 is oRSp3.Open
I never all c:\inetpub\ (the error above is exact and spelled correctly). I am puzzled.
Here is my code:
<!--#include File="adovbs.inc"-->
<%
dim oConn
dim oRSp
Set oConn=Server.CreateObject("ADODB.connection"
Set oRSp=server.createobject("ADODB.recordset"
oConn.Open "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=c:\Inetpub\ & _
"Exclusive=No;"
oRSp.Open "Select * From astu0021.dbf WHERE Status <> 'I' AND Status <> 'N' AND SocSecNum='" & Session("password" &"'", oConn, , ,adCmdText
response.write "<table border=0><tr><td width=600 bgcolor=darkblue><font color=white>Student Information</font>"
do while NOT oRSp.EOF
response.write "<table bgcolor=white border=0>"
response.write "<tr><td width=150><b>Student Name</b></td><td width=450>" & oRSp("firstname" & oRSp("middlename" & oRSp("lastname" & "</td></tr>"
response.write "<tr><td width=150><b>Department</b></td><td width=450>" & oRSp("Department"& "</td></tr>"
response.write "<tr><td width=150><b>Grade</b></td><td width=450>" & oRSp("Grade"& "</td></tr>"
dim oConn2
dim oRSp2,oRSp3,course
Set oConn2=Server.CreateObject("ADODB.connection"
Set oRSp2=server.createobject("ADODB.recordset"
Set oRSp3=Server.CreateObject("ADODB.RecordSet"
oConn2.Open "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=c:\Inetpub\ & _
"Exclusive=No;"
Set oRSp2.ActiveConnection=oConn2
oRSp2.Source="Select * From agrd0021.dbf WHERE Stulink = " & Session("Stulink" & "ORDER BY BeginPrd"
oRSp2.Open
do while NOT oRSp2.EOF
response.write "<tr><td width=150>" & oRSp2("BeginPrd"
course=oRSp2("Course"
oRSp2.MoveNext
Set oRSp3.ActiveConnection=oConn2
oRSp3.Source="Select * From acrs0021.dbf WHERE Course = " & course
oRSp3.Open
response.write "</td><td width=450>" & oRSp3("Title" & "</td></tr>"
oRSp3.close
set oRSp3=nothing
Loop
oRSp2.Close
set oRSp2=nothing
oConn2.close
Set oConn2=Nothing
response.write "</table><hr>"
oRSp.MoveNext
Loop
oRSp.close
set oRSp=nothing
oConn.close
set oConn=nothing
response.write"</td></tr></table>"
%>
When I run the code listed below I receive the following
Here is my error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Visual FoxPro Driver]Memo file c:\inetpub\ is missing or is invalid.
/sasixp/grades.asp, line 45
LINE 45 is oRSp3.Open
I never all c:\inetpub\ (the error above is exact and spelled correctly). I am puzzled.
Here is my code:
<!--#include File="adovbs.inc"-->
<%
dim oConn
dim oRSp
Set oConn=Server.CreateObject("ADODB.connection"
Set oRSp=server.createobject("ADODB.recordset"
oConn.Open "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=c:\Inetpub\ & _
"Exclusive=No;"
oRSp.Open "Select * From astu0021.dbf WHERE Status <> 'I' AND Status <> 'N' AND SocSecNum='" & Session("password" &"'", oConn, , ,adCmdText
response.write "<table border=0><tr><td width=600 bgcolor=darkblue><font color=white>Student Information</font>"
do while NOT oRSp.EOF
response.write "<table bgcolor=white border=0>"
response.write "<tr><td width=150><b>Student Name</b></td><td width=450>" & oRSp("firstname" & oRSp("middlename" & oRSp("lastname" & "</td></tr>"
response.write "<tr><td width=150><b>Department</b></td><td width=450>" & oRSp("Department"& "</td></tr>"
response.write "<tr><td width=150><b>Grade</b></td><td width=450>" & oRSp("Grade"& "</td></tr>"
dim oConn2
dim oRSp2,oRSp3,course
Set oConn2=Server.CreateObject("ADODB.connection"
Set oRSp2=server.createobject("ADODB.recordset"
Set oRSp3=Server.CreateObject("ADODB.RecordSet"
oConn2.Open "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=c:\Inetpub\ & _
"Exclusive=No;"
Set oRSp2.ActiveConnection=oConn2
oRSp2.Source="Select * From agrd0021.dbf WHERE Stulink = " & Session("Stulink" & "ORDER BY BeginPrd"
oRSp2.Open
do while NOT oRSp2.EOF
response.write "<tr><td width=150>" & oRSp2("BeginPrd"
course=oRSp2("Course"
oRSp2.MoveNext
Set oRSp3.ActiveConnection=oConn2
oRSp3.Source="Select * From acrs0021.dbf WHERE Course = " & course
oRSp3.Open
response.write "</td><td width=450>" & oRSp3("Title" & "</td></tr>"
oRSp3.close
set oRSp3=nothing
Loop
oRSp2.Close
set oRSp2=nothing
oConn2.close
Set oConn2=Nothing
response.write "</table><hr>"
oRSp.MoveNext
Loop
oRSp.close
set oRSp=nothing
oConn.close
set oConn=nothing
response.write"</td></tr></table>"
%>