| Author |
Message |
pln *nix forums beginner
Joined: 21 Jul 2006
Posts: 2
|
Posted: Fri Jul 21, 2006 7:41 am Post subject:
C# MSSQL2000 update
|
|
|
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). |
|
| Back to top |
|
 |
Nick Keighley *nix forums Guru Wannabe
Joined: 03 Apr 2005
Posts: 209
|
Posted: Fri Jul 21, 2006 8:02 am Post subject:
Re: C# MSSQL2000 update
|
|
|
pln wrote:
| Quote: | 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.
--
Nick Keighley |
|
| Back to top |
|
 |
Flash Gordon *nix forums Guru
Joined: 28 Feb 2005
Posts: 1258
|
Posted: Fri Jul 21, 2006 8:18 am Post subject:
Re: C# MSSQL2000 update
|
|
|
pln wrote:
| Quote: | 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.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc |
|
| Back to top |
|
 |
pln *nix forums beginner
Joined: 21 Jul 2006
Posts: 2
|
Posted: Fri Jul 21, 2006 9:55 am Post subject:
Re: C# MSSQL2000 update
|
|
|
|
OK. I asked because there wasn't a C# group. |
|
| Back to top |
|
 |
michaelquinlivan@gmail.co *nix forums beginner
Joined: 03 Jul 2006
Posts: 24
|
Posted: Fri Jul 21, 2006 10:40 am Post subject:
Re: C# MSSQL2000 update
|
|
|
pln wrote:
| Quote: | OK. I asked because there wasn't a C# group.
|
bullshit, try microsoft.public.dotnet.languages.csharp |
|
| Back to top |
|
 |
Flash Gordon *nix forums Guru
Joined: 28 Feb 2005
Posts: 1258
|
Posted: Fri Jul 21, 2006 11:11 am Post subject:
Re: C# MSSQL2000 update
|
|
|
pln wrote:
| Quote: | 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.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|