niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » C
C# MSSQL2000 update
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
pln
*nix forums beginner


Joined: 21 Jul 2006
Posts: 2

PostPosted: Fri Jul 21, 2006 7:41 am    Post subject: C# MSSQL2000 update Reply with quote

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

PostPosted: Fri Jul 21, 2006 8:02 am    Post subject: Re: C# MSSQL2000 update Reply with quote

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

PostPosted: Fri Jul 21, 2006 8:18 am    Post subject: Re: C# MSSQL2000 update Reply with quote

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

PostPosted: Fri Jul 21, 2006 9:55 am    Post subject: Re: C# MSSQL2000 update Reply with quote

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

PostPosted: Fri Jul 21, 2006 10:40 am    Post subject: Re: C# MSSQL2000 update Reply with quote

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

PostPosted: Fri Jul 21, 2006 11:11 am    Post subject: Re: C# MSSQL2000 update Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 3:12 pm | All times are GMT
navigation Forum index » Programming » C
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts HPSBMA02133 SSRT061201 rev.1 - HP Oracle for OpenView (Of... Security Alert HP-UX 0 Thu Jul 20, 2006 6:43 pm
No new posts HPSBMA02133 SSRT061201 rev.1 - HP Oracle for OpenView (Of... Security Alert HP-UX 0 Thu Jul 20, 2006 5:53 pm
No new posts Problem w/ Yast2, can't install new software or update Emmanuel Durand Suse 0 Thu Jul 20, 2006 5:50 am
No new posts HOW-TO Full update from 5.3 to 6.0-6.1 ? Vlad Mfk FreeBSD 2 Wed Jul 19, 2006 5:52 am
No new posts Changing the time of update-status Mazilo Suse 4 Tue Jul 18, 2006 1:45 pm

Magic The Gathering Cards | Web Advertising | Download PC Drivers | Loans | Best Credit Cards
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1845s ][ Queries: 16 (0.0760s) ][ GZIP on - Debug on ]