-
Error : Microsoft VBScript comp Expected 'Case'
Me again....sorry
really would appreciate help here. Trying to insert a record and then display that record in a page called custdetails.asp after, including the auto generated cust id. This is the code I used and I'm getting the below error (in blue) and its referring to the blue line in the code, previously i had Set instead of Select and I received the error
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
so i thought I would try Select instead and i got the error below (in blue)
Error : Microsoft VBScript comp Expected 'Case'
This is the code i used:
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = "SET NOCOUNT ON;" & MM_editQuery & ";SELECT @" & "@IDENTITY AS Ident"
Select rsLastIdent = MM_editCmd.Execute
if NOT rsLastIdent.EOF then
LastIdent = rsLastIdent.Fields.Item("Ident").Value
end if
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
If(CStr(Request("MM_insert"))<>"") Then
Session("LastIdent")=LastIdent
Response.Redirect "custdetail.asp"
End if
any help will be greatly appreciated!!
Similar Threads
-
By imosha in forum VB Classic
Replies: 7
Last Post: 08-11-2005, 02:11 PM
-
By VanDam in forum Database
Replies: 0
Last Post: 07-09-2005, 04:18 AM
-
By Joshua in forum ASP.NET
Replies: 1
Last Post: 06-27-2003, 07:10 PM
-
By Martin in forum VB Classic
Replies: 22
Last Post: 12-03-2001, 03:53 AM
-
By Yoel Martinez in forum VB Classic
Replies: 1
Last Post: 12-12-2000, 03:17 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|