Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hotshot_21
Yak Posting Veteran
97 Posts |
Posted - 2006-04-20 : 02:38:42
|
| helloiam using store procedure to open the the selected rows in datagrid into Excel.but iam getting blank spreadsheet.the querystrings are getting passed but the rows turn out to be blank.if i do not use store procedure than everything is ok.the querystring contains multiple strings so as to display it in excel.the stroe procedure is CREATE PROCEDURE Employee_ExcelDisplayHO(@ID varchar(100))ASSELECT * FROM employee_master WHERE empuser_id IN (@ID)and this is the statement that i use in my .aspxpage to call store procedureDim Cmd As New SqlDataAdapter("Employee_ExcelDisplayHO", myconn) cmd.SelectCommand.CommandType = CommandType.StoredProcedure cmd.SelectCommand.Parameters.Add(New SqlParameter("ID", SqlDbType.VarChar, 100)) cmd.SelectCommand.Parameters("@ID").Value = Request.QueryString("ID")any suggestions wht may be wrong |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-20 : 03:24:44
|
| i suspect the @id is a list of id's you want to query? -- just hinting at the 'in' your usinguse a split function first on @id...i believe corey has one at his weblog...select * from employee_master where empuser in (select field1 from fnSplit(@id))or you can use patindex--------------------keeping it simple... |
 |
|
|
hotshot_21
Yak Posting Veteran
97 Posts |
Posted - 2006-04-20 : 03:35:22
|
| yes iam expecting list of ID's .can u expalin u r solution a bit more |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|