|
Actually you need to change it to be
exec testProc('2104206,123')
If you look at what the SP is trying to do he wants to be able to pass in a range of values and return those details which are in the LIST of items as a single parametr.
Now I'm not even going to get started on WHY this is dangerous for security - but this will make it work......
Mark.
|
|
|
|
|
|
Hi,
If we create a stored procedure where and how is it saved and how is error handling done to the procedure. If any error occours where is it thrown. Help me.
Thanx,
Yamini.
|
|
|
|
|
yaminilatha wrote: where and how is it saved
Inside your database.
yaminilatha wrote: how is error handling done to the procedure
You can do error handing inside the proc by checking the @@error value.
yaminilatha wrote: If any error occours where is it thrown.
If things break bad enough, you'll get an exceptin thrown in your calling code. But, you can handle most errors in your proc.
It really is hard to say more, without knowing what language you're using to call the proc. .NET languages define exceptions you can catch that are specific to DB calls.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I am using C#.net. My question in the interview was how do you perform error handling in sql server when you create a stored procedure.Where are the errors thrown not in .net in sql server.
yamini
|
|
|
|
|
yaminilatha wrote: If we create a stored procedure where and how is it saved and how is error handling done to the procedure. If any error occours where is it thrown. Help me.
Check the following link to get idea about procedures
http://w3hearts.com/articles/6/[^]
|
|
|
|
|
Thanx, this site was very useful.
|
|
|
|
|
Hi all,
I want to store Word document in SQL Server. Who can help me?
Datatype? Input? Example?
Thanks for reading this question.
|
|
|
|
|
It will be a BLOB, I would think.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you very much
|
|
|
|
|
|
I'm using VB.NET 2005
Thanks you.
|
|
|
|
|
i have a gray scale image.(24 bit bmp format). how do i store it in a database.
i am using SQL Server-2003.
Also this server has a data type called 'image' but i am not able to use it.
please help.
thanku all.
|
|
|
|
|
There isn't a SQL Server 2003. I take you mean 2005.
http://www.codeproject.com/aspnet/PicManager.asp[^]
Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture)
http:\\www.frankkerrigan.com
|
|
|
|
|
sorry i meant to state sql server 2000.
|
|
|
|
|
|
Hi All
I had a hard disk failure this morning hard disk(HD) c: so i replaced the HD and installed sql 2000 sp3 i have a back up for my data base on other HD D: i have 1 mdf and around 30 ldf.
My problem is that iam receiving an error 5712 not a valid database file header. PageAudit property is incorrect.
I googled so i found this error occurs when attaching db in old version like from sql 2000 to 7.0, but this case isnt applicable on my issue. I tried aslo exec sp_attach_db still giving same error on one ldf file.
How can i fix this? it is urgent my db is down.
I tried also to create a new db with same name and replaced the mdf but didnt work. Kindly note iam not a data base admin and i have no enough knowledge in this subject.
|
|
|
|
|
Hi everyone
I've done a Windows application in C# where I can retrieve data from a database. But I want to port my database records to a server and then let my Windows appl. getting the the through the internet. Do you know of some easy way to handle this problem...
All the best
Al
NB I'm using ADO.NET for querying
|
|
|
|
|
ComCoderCsharp wrote: Do you know of some easy way to handle this problem...
If you can already use the SQL Server internally from other machines then most likely all you need is to open the relevant port on the firewall. However, the port is closed for a reson.
You should not expose your SQL Server to the internet. You should create a webservice that communicates with the external application.
|
|
|
|
|
Hi
Can someone please tell me if the (+) place makes a difference & what that difference is.
kazo
|
|
|
|
|
Hi Kazo
The (+) is used to identify the "outer" part of outer joins in Oracle. So
select d.dept_code, e.emp_name
from dept, emp
where dept.dept_code = emp.dept_code (+) shows all departments, and lists the employees if the department has any.
I prefer to use the newer ANSI syntax:
select d.dept_code, e.emp_name
from dept
left outer join emp
on emp.dept_code = dept.dept_code
order by d.dept_code, e.emp_name This is functionally identical, will work on other databases, and I think shows the intent of the query more clearly.
Regards
Andy
|
|
|
|
|
Actually i want some character before the digits.so it should looklike RXY1234.
because the company ID should not be only 1,2..like this.
p.sethi
|
|
|
|
|
hi.
U will again have to use a trigger. but not the autoincrement features.
maintain a count of the company ids.
u can use string concatenation to insert "RXY" + the company id count, while inserting the string in the company id column.
Keshav Kamat
India
|
|
|
|
|
Thx Tirtha,
yes u r right..
when inserting a record in table there is no checking mechanism to prevent duplicacy and it is difficult to check each and every record while inserting as
data is uploaded in bulk.
It is not that i have duplicate customerids in the table but there
are same records (e.g. same customer info.) on different customerids.
where customerid is the primary key.(Auto number)
Thanx and Regards,
Ahmad
|
|
|
|
|
You could make a DISTINCT select on a certain field (f.e. email address, or name + lastname) and select it into another table. Then you can just swap the tables.
But I recently did this with our mailing list, and this was the easiest solution.
SELECT *<br />
INTO Table2<br />
FROM Table1 AS T1<br />
WHERE T1.email NOT IN (SELECT DISTINCT email FROM Table2 AS T2 WHERE T2.ID < T1.ID)
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|