C# MSSQL2000 update

P

pln

I am trying to update an sql table using stored procedures, C# and ADO.
My code samples are as follows
C#
public void Save(Object s, EventArgs e)
{
sqlConnection sqlConn = new
SqlConnection(ConfigurationSettings.AppSettings["CdDbParam"]);
SqlCommand sqlCmd = new SqlCommand("sp_Update_CallOutDetails",
sqlConn);
SqlCmd.CommandType = CommandType.StoredProcedure ;

sqlCmd.Parameters.Add("@vchCallOutNo", txtbCallOutNo.Text);
sqlCmd.Parameters.Add("@vchCallOutDetails", txtbCallOutDetails.Text);

sqlConn.Open();
sqlCmd.ExecuteNonQuery();
sqlConn.Close();
}

Stored proc
CREATE PROCEDURE [fieldman],[sp_Update_CallOutDetails]
@vchCallOutNo VARCHAR(10), @vchCallOutDetails VARCHAR(1024) AS
UPDATE CallOuts
SET CallOutDetails = @vchCallOutDetails
WHERE CallOutNo = @vchCallOutNo

Using EXECUTE form within SQL works fine.
I get no error messages.
I think the problem is with ADO but where should I look?
(If this is the wrong forum could someone point me in the right
direction).
 
N

Nick Keighley

pln said:
I am trying to update an sql table using stored procedures, C# and ADO.

<snip>

this is off -topic to comp.lang.c. I suggest you post elsewhere.
 
F

Flash Gordon

pln said:
I am trying to update an sql table using stored procedures, C# and ADO.

<snip>

Then why ask in a C group? C# is a *very* different language for which
I'm sure Microsoft will have a group.
 
F

Flash Gordon

pln said:
OK. I asked because there wasn't a C# group.

Please quote sufficient context for your message to stand on its own.
www.talkaboutprogramming.com is NOT Usenet, it is just a web interface
to something far bigger. There is no guarantee that people will have
seen the message you are replying to. Check out the last link in my sig
for more information about this group, paying special attention to the
bits about Google Groups which is another web interface to USenet.

Do you ask in an Apple shop about IBM PCs? Anyway, you obviously did not
look very hard because there are lots of news groups with csharp in the
name. microsoft.public.dotnet.csharp.general,
microsoft.public.dotnet.languages.csharp, foreign language versions,
csharpbuilder groups for those using Boreland.
 
J

J. J. Farrell

pln said:
OK. I asked because there wasn't a C# group.

But why ask in comp.lang.c rather than alt.beer, for example? There are
several newsgroups which have nothing whatsoever to do with C# - why
pick on this one?

I'm sure there are several groups in the microsoft hierarchy where
discussion of C# is topical.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top