J
Jiador
Hi,
This is a VBscript function that I have in my asp page and when I call
it, I get this error:
Type mismatch: ‘RecCount'
Function RecCount (tablename)
dim oConn
dim rs
dim strSQLQuery
set oConn = Server.CreateObject("ADODB.Connection")
oConn.Provider="Microsoft.Jet.OLEDB.4.0"
oConn.Open "C:\Inetpub\wwwroot\GCIP_WEB\fpdb\GCIP_DB.mdb"
set rs = Server.CreateObject("ADODB.recordset")
strSQLQuery = "SELECT * FROM " & tablename
rs.Open strSQLQuery, oConn
set RecCount = rs.RecordCount
rs.close
set rs = nothing
oConn.close
set oConn = nothing
end Function
And here is the call:
<input type="button" value="Record" name="Record" onclick=
"Document.write '<p>'& RecCount('GCIP_CASES') & '</p>' " Language =
"VBscript" > </p>
Can anybody tell me what I'm doing wrong ?
Thank you
Jiador
This is a VBscript function that I have in my asp page and when I call
it, I get this error:
Type mismatch: ‘RecCount'
Function RecCount (tablename)
dim oConn
dim rs
dim strSQLQuery
set oConn = Server.CreateObject("ADODB.Connection")
oConn.Provider="Microsoft.Jet.OLEDB.4.0"
oConn.Open "C:\Inetpub\wwwroot\GCIP_WEB\fpdb\GCIP_DB.mdb"
set rs = Server.CreateObject("ADODB.recordset")
strSQLQuery = "SELECT * FROM " & tablename
rs.Open strSQLQuery, oConn
set RecCount = rs.RecordCount
rs.close
set rs = nothing
oConn.close
set oConn = nothing
end Function
And here is the call:
<input type="button" value="Record" name="Record" onclick=
"Document.write '<p>'& RecCount('GCIP_CASES') & '</p>' " Language =
"VBscript" > </p>
Can anybody tell me what I'm doing wrong ?
Thank you
Jiador