This is a discussion on Recordset and Stored Procedure issues! within the ASP Development forums, part of the Programming & Scripting category; Originally Posted by mehere do you have an include file like adovbs.inc on your page? if so, remove your const ...
| |||||||
|
#31
| ||||
| ||||
| Quote:
Microsoft VBScript compilation (0x800A03EE) Expected ')' edit1.asp, line 20, column 12 this is line 20: Code: ("@username",adVarChar,adParamInput,50,session("username"))
|
|
#32
| ||||
| ||||
| What you have there is only a fragment of a statement. Is it a continuation of the previous line? as in Code: cmd.Parameters.Append cmd.CreateParameter &_
("@username",adVarChar,adParamInput,50,session("username"))
__________________ Wolffy ------------------------ Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary. |
|
#33
| ||||
| ||||
| sorry not sure what you mean? are you saying i need to do the same thing for first name and surname? wouldnt this be pointless as the parameters and datatypes are defined in the stored procedure?? |
|
#34
| ||||
| ||||
| Uh, no. What I'm say is that the statement you posted is not a valid statement in and of itself. Unless it's part of a complete statement, as I've shown, it's going to throw an error. What the line right before the line in error? |
|
#35
| ||||
| ||||
| Quote:
Code: cmd.Parameters.Append cmd.CreateParameter &_ |
|
#36
| ||||
| ||||
| Ach, remove the ampersand. It seems it was in the example code and just kept getting missed. We most definitely do NOT was to concatenate two strings here. Code: cmd.Parameters.Append cmd.CreateParameter _
("@username",adVarChar,adParamInput,50,session("username"))
Code: cmd.Parameters.Append cmd.CreateParameter("@username",adVarChar,adParamInput,50,session("username"))
|
|
#37
| ||||
| ||||
| Quote:
Code: <%
Dim cmd, rs, connect, intNumber
Set cmd = Server.CreateObject ("ADODB.Command")
connect = "Provider=SQLOLEDB;Persist Security Info=False;User ID=sa; &;Password=test;" ;"Initial Catalog=coursesSQL;Data Source=MY DB LOCATION"
cmd.ActiveConnection = connect
cmd.CommandText = "MY STORED PROC"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("@username",adVarChar,adParamInput,50,session("username"))
Set rs = cmd.Execute
intNumber = comm.Parameters("@username")
set cmd = nothing
%>
Error Type: Microsoft VBScript compilation (0x800A0401) Expected end of statement edit1.asp, line 12, column 87 once i learn how to do this propely, ill be more confident in doing my other many stored procedures and calling them from other pages.. [edit] below is line 12 Code: connect = "Provider=SQLOLEDB;Persist Security Info=False;User ID=sa; &;Password=test;" ;"Initial Catalog=coursesSQL;Data Source=db location" |
|
#38
| ||||
| ||||
| it looks like too many quotes ... Code: connect = "Provider=SQLOLEDB;Persist Security Info=False;User ID=sa; Password=test;Initial Catalog=coursesSQL;Data Source=db location"
__________________ Quote of the Month: Mistakes: It could be that the purpose of your life is only to serve as a warning to others. Questions to Ponder: Why do banks charge you a "non-sufficient funds fee" on money they already know you don't have? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SQL Job or stored procedure | todd2006 | SQL Development | 5 | February 11th, 2009 02:20 PM |
| stored procedure | todd2006 | ASP Development | 7 | February 5th, 2009 03:02 PM |
| stored procedure | todd2006 | Microsoft SQL Server | 1 | February 5th, 2009 01:25 PM |
| If statement stored procedure | peebman2000 | SQL Development | 32 | May 23rd, 2008 03:54 PM |
| Dynamic Stored Procedure | jmurrayhead | Microsoft SQL Server | 16 | March 26th, 2008 11:19 AM |