|
 |
asp_databases thread: another type mismatch
Message #1 by rrrabe@y... on Wed, 13 Dec 2000 11:03:35 -0000
|
|
Bonjour!,
I had a similar problem with Oliver but the VBscript is pointing to a
subroutine name "RecommendationProc" as the type mismatch. The code are
shown below. What's the problem?
These codes work fine on "development server". However, after publishing
it, the type mismatch error occured. Seems interesting to me since the
only difference is before and after publishing the page.
Hoping somebody can help me on this.
merci,
Bay
______________________________________________________________
Dim conn, rs, objCommand, numOfRec, listOfRec(500), search
sub RecommendationProc(lamanya)
response.write "laman is - " & VarType(lamanya)
set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = conn
objCommand.CommandText = "qryRec"
objCommand.CommandType = adCmdStoredProc
set objParam = objCommand.CreateParameter("itu-r no", adVarChar,
adParamInput, 20)
objCommand.Parameters.Append objParam
objCommand.Parameters("itu-r no") = "%" & lamanya & "%"
set rs = objCommand.Execute
set objCommand = Nothing
set objParam = Nothing
If rs.eof then
response.write "No records found containing " & lamanya
else
numOfRec = 0
do until (rs.eof)
listOfRec(numOfRec)= rs.Fields("ITU-R_No")
numOfRec = numOfRec + 1
Response.Write "<Tr>" & chr(10)
for each item in rs.Fields
Response.Write "<TD>" & chr(10)
Response.Write "<a href='detail.asp?bilang=" & listOfRec(numOfRec-1) & "&pangalan=Itu-r_No'>" & chr(10)
Response.Write item & chr(10)
Response.Write "</a>" & chr(10)
Response.Write "</TD>" & chr(10)
next
Response.Write "</Tr>" & chr(10)
rs.MoveNext
loop
end if
end sub
search = Request.Form("search")
response.write "search is - " & VarType(search)
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.Open "palms"
call RecommendationProc(search)
---
FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND
INSIGHTS IN YOUR INBOX!
Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb?s
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #2 by rrrabe@y... on Thu, 14 Dec 2000 07:51:14 -0000
|
|
Guys,
I learned my lesson very well and I want to share it with you.
The only reason why I got this "type mismatch" error is the subroutines
were declared outside the <html></html> tags. Now, I placed it inside the <body> tags and
works. I just dont know if works inside the <head> tags.
merci,
Bay
---
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS? Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development,
Web Development, Networking & Communications, and Hardware & Systems.
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
|
|
 |