/ Forside / Teknologi / Multimedie & design / FrontPage / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
FrontPage
#NavnPoint
molokyle 3730
bentjuul 3355
BjarneD 2776
dk 1515
emesen 1490
strarup 1480
catbody 1241
brokke44 1160
er_du_klog 1052
10  PARKENSS 1050
Please help me with this function!
Fra : Jiador


Dato : 23-01-04 20:14

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

 
 
Søg
Reklame
Statistik
Spørgsmål : 177501
Tips : 31968
Nyheder : 719565
Indlæg : 6408522
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste