Store Procedures
Hi,
Just made a Stored Procedure using Access. When it is used, IE is saying that it is looking at an Invalid SQL statement. When the SQL code is copies from Access, the program works. Code below, one uses the Select method, the other the Stored Procedure:
<% @language="vbscript" %>
<% option explicit %>
<html>
<head>
<title>Untitled</title>
</head>
<body>
Try it out
<%
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "qAllNewBoats", "DSN=Sailor1", adOpenForwardOnly
'objRS.Open "SELECT Boats.Boat_Class FROM Boats;", "DSN=Sailor1"
Do While Not objRS.EOF
Response.write objRS("Boat_Class") & "<p>"
objRS.MoveNext
Loop
objRS.Close
Set objRS=Nothing
%>
</body>
</html>
Note:'objRS.Open "SELECT Boats.Boat_Class FROM Boats;", "DSN=Sailor1"
is copied from Access SQL in the Stored Procedure.
Why won't it work!!!
Thks,
Joe
|