Hiya,
Here's the problem. I have a stored procedure which will contains output variable. It will be called from my .cs file, something like this:
String sqlString = "Exec getEmployeeInfo ';"
but now the stored proc. is expecting output variables, so I declared some and called it like this:
messy, yes. Don't worry about the variable names. It compiles fine, but then here's the runtime error:
Also, if something is of type datetime in sql server, is that a regular string in C#/asp.net?
TIA.
Here's the problem. I have a stored procedure which will contains output variable. It will be called from my .cs file, something like this:
String sqlString = "Exec getEmployeeInfo ';"
but now the stored proc. is expecting output variables, so I declared some and called it like this:
Code:
String sqlString = "Exec getEmployeeInfo '" + @ssn + "'" + " " + "'" + @sdt + "'" + " " + "'" + @sn + "'" + " " + "'" + @wl + "'" + " " + "'" + @ln + "'" + " " + "'" + @fn + "'";
messy, yes. Don't worry about the variable names. It compiles fine, but then here's the runtime error:
Code:
Exception Details: System.Exception: Error: 170: Line 1: Incorrect syntax near '0'.
Source Error:
Line 628:
Line 629: Catch e As SqlException
Line 630: Throw New Exception("Error: " & e.Number & ": " & e.Message)
Line 631: Finally
Line 632: ' Close the SQL connection (DataSet is disconnected)
Also, if something is of type datetime in sql server, is that a regular string in C#/asp.net?
TIA.