I am using VS 2005, C# and .NCF2.0. I have some questions on rda.submitsql wondering if someone can answer them:
1) I know rda.submitsql cannot return values. How do I know if the statement was executed?
2) Is it possible to submit a table for an update/insert/delete? Unfortunately, I cannot use rda.push.
3) Is it possible to use parameters to update multiple records in a table? If yes, can you please direct me to an example?
I want to limit the connections to IIS. Any guidance would be greatly appreciated.
Thanks!
Hi, I will try to answer your questions:
1) If the execution fails. you will receive a SqlCeException
2) No, you can only submit a sql string, so you must submit individual insert/update/delete statements per row in your table.
3) You can call a stored procedure in your submit sql statement, and perform whatever you like there, except SELECT. You can also submit several SQL statements in one submitsql call, separated by ";" (semicolon). Limitations on the web server may limit the SQLString to 32K.
|||Erik,Thank you for your reply. I am not familiar with stored procedures. I am assuming the stored procedures are created on the server within the SQL Server database. My question is would I have to create it manually every time the program is deployed and tries to connect to a new database?
Would you know of a sample walk through available online?
Thanks again!
|||Stored procedures are collections of T-SQL statements stored within the user database on the server. So no need to create manually every time. There are several introductions to stored procedures, see for example: http://msdn2.microsoft.com/en-us/library/ms173053.aspx or this: http://www.sql-server-performance.com/tn_stored_procedures.asp|||Thanks Erik for your helpful replies and links! I have marked my question(s) answered.
No comments:
Post a Comment