473,698 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# MSSQL2000 update

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(C onfigurationSet tings.AppSettin gs["CdDbParam"]);
SqlCommand sqlCmd = new SqlCommand("sp_ Update_CallOutD etails",
sqlConn);
SqlCmd.CommandT ype = CommandType.Sto redProcedure ;

sqlCmd.Paramete rs.Add("@vchCal lOutNo", txtbCallOutNo.T ext);
sqlCmd.Paramete rs.Add("@vchCal lOutDetails", txtbCallOutDeta ils.Text);

sqlConn.Open();
sqlCmd.ExecuteN onQuery();
sqlConn.Close() ;
}

Stored proc
CREATE PROCEDURE [fieldman],[sp_Update_CallO utDetails]
@vchCallOutNo VARCHAR(10), @vchCallOutDeta ils VARCHAR(1024) AS
UPDATE CallOuts
SET CallOutDetails = @vchCallOutDeta ils
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).

Jul 21 '06 #1
6 1430
pln wrote:
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

Jul 21 '06 #2
pln wrote:
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
Jul 21 '06 #3
pln
OK. I asked because there wasn't a C# group.

Jul 21 '06 #4
MQ

pln wrote:
OK. I asked because there wasn't a C# group.
bullshit, try microsoft.publi c.dotnet.langua ges.csharp

Jul 21 '06 #5
pln wrote:
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.publi c.dotnet.csharp .general,
microsoft.publi c.dotnet.langua ges.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
Jul 21 '06 #6

pln wrote:
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.

Jul 21 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2030
by: Taras | last post by:
Hello! I have a problem. I'm using a dataset in VB.NET with multiple tables with relations between them. I would like dataset to update to all related tables with right identity, when certain record is added. The problem is that I don't know how to do it, when I'm not using stored procedures. I found an article in which OnRowUpdated event of the dataadapter is used. On this event ExecuteScalar method of the oledbcommand object is called...
0
1509
by: Rene Kadner | last post by:
Hi, Zu Test-/Entwicklungszwecken mache ich eine Rücksicherung von der produktiven MSSQL7 Datenbank auf einen MSSQL2000. Das klappte bisher immer Problemlos. Neuerdings erhalte ich aber aus meiner Appliaktion einen Fehler, wenn ich in ein Memofeld schreiben will: "Codepageübersetzungen werden für den text-Datentyp nicht unterstützt. Von 1252 in 850."
1
1554
by: Inquisitive | last post by:
Hello! Does anybody know whether mssql2000 and emc mirrorvew _certified_ for joint work? (Mirrorview is a fc-based remote mirroring solution) I mean is it supported from the MS point of view to put mssql datafiles on emc mirrorview volumes?
3
2612
by: heynothanks | last post by:
(MSSQL2000) I have read the transaction/locking sections in the MS-help, online and several books. What I want to understand is the transaction behavior in single statements . If I have a Table: "Letters" with 1 column "L" and the table presently has rows{A,B,C,D} Case 1 (Insert): First start transaction T1 "SELECT * FROM Letters" Next start transaction T2 "INSERT INTO Letters
2
2749
by: Igor | last post by:
Is there a way to transfer ntext data from one table to another? I tried this UPDATE SET = (SELECT FROM WHERE =1) WHERE = 1;
0
1419
by: Marek Wierzbicki | last post by:
Drodzy czytelnicy listy Szukam specjalisty znającego się perfekcyjne na MSSQL2000. Interesuje mnie wiedza typu "inside", czyli struktury plików itp. Konkretnie chodzi mi o organizacje wewnętrzną stron w pliku i możliwość gubienia ich przez MSSQL i ewentualne czyszczenie takich stron. Interesuje mnie raczej wiedza niecertyfikowana przez Microsoft, stąd status MVP nie jest w tym przypadku żadną referencją Prawdę mówiąc najlepszy byłby...
0
1179
by: chowdhp | last post by:
Hi, I am trying to migrate our server MSSQL2000 to MSSQL2005 and getting the following errors. 1. When I tried to restore the Master DB in the test server(single user mode) from a backup file it says version mismatch. I cannot detach and attach the master database as it is in the production server! 2. While migrating the DTS I got the following error: "Index was out of range. Must be non-negative and less than the size of the...
0
1227
by: comp21 | last post by:
Hi, Now, I have retrieved or imported data from excel spreadsheet to vb6 application. Now I want to compare this part of data with the one already existing in mssql2000 server(table name being same). If some data which is there in excel spread sheet not to be found in mssql2000 server then those data has to be stored in a seperate table in mssql server. Can anyone please help me with the code....
3
1809
by: Erwin Moller | last post by:
Hi Group, I developed a intranet site using MSSQL7/win2000 some time ago. The target environment used MSSQL2000/8. We were (almost painlessly) able to import the db-scheme and data from 7 to 8. (Bravo MSSQL) Now I need to do some upgrading on the application and I would like to have a copy of the database from MSSQL2000/8 to MSSQL7. Is that also possible?
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.