|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Recordset Error
I keep getting this error
Microsoft VBScript runtime error '800a000d' Type mismatch /test/include.asp, line 28 this is the code <% @ LANGUAGE="VBScript" %> <% Option Explicit Response.Buffer = True %> <!--#include file="adovbs.inc"--> <% 'Function that sends the recordset data back to the main page Function getRecords(sectionid) 'Open Database Connection Dim oConn, sConnection Set oConn = Server.CreateObject("ADODB.Connection") sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=ommited;" & _ "Jet OLEDB-Database Password=ommited;" & _ "Persist Security Info=False" oConn.Open(sConnection) 'Open Recordset Dim rs, qString Set rs = Server.CreateObject("ADODB.RecordSet") ' Open the recordset If sectionid = "home" Then <----- Line 28 qString = "SELECT * FROM news" rs.Open qString, oConn, 1 getRecords(rs) ElseIf sectionid = "about us" Then qString = "SELECT * FROM generic where id = 1" rs.Open qString, oConn, adOpenForwardOnly, adLockReadOnly getRecords(rs) ElseIf sectionid = "services" Then qString = "SELECT * FROM generic where id = 2" rs.Open qString, oConn, adOpenForwardOnly, adLockReadOnly getRecords(rs) ElseIf sectionid = "contact us" Then qString = "SELECT * FROM generic where id = 3" rs.Open qString, oConn, adOpenForwardOnly, adLockReadOnly getRecords(rs) ElseIf sectionid = "portfolio" Then qString = "SELECT * FROM portfolio" rs.Open qString, oConn, adOpenForwardOnly, adLockReadOnly getRecords(rs) End If 'Close Everything rs.close set rs = nothing oConn.Close set oConn = nothing End Function %> |
|
#2
|
|||
|
|||
|
where is sectionid declared? what is its value?
__________________
Programmer's Corner |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Recordset Error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|