Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart6-May-04 17:53
protectorHeath Stewart6-May-04 17:53 
GeneralRe: Sound- Two Events at a time Pin
MeterMan6-May-04 17:58
MeterMan6-May-04 17:58 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart6-May-04 18:01
protectorHeath Stewart6-May-04 18:01 
GeneralRe: Sound- Two Events at a time Pin
MeterMan6-May-04 13:25
MeterMan6-May-04 13:25 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart6-May-04 17:57
protectorHeath Stewart6-May-04 17:57 
GeneralRe: Sound- Two Events at a time Pin
MeterMan6-May-04 19:46
MeterMan6-May-04 19:46 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart7-May-04 3:08
protectorHeath Stewart7-May-04 3:08 
GeneralDiffgram Updates Pin
MrJJKoolJ6-May-04 7:31
MrJJKoolJ6-May-04 7:31 
Hi Heath,

Here is the start of my webservice Update method. How does this look? Did I leave anything out? Can I use messagebox object inside a webservice? If this is running on the server it wouldn't be viewable to client correct?

<br />
<br />
public bool UpdateDB(dataset dsDiff)<br />
		{<br />
			    string sSQL;<br />
			<br />
			    sSQL = @"SELECT * From MidnightReadings";<br />
			<br />
			    SqlConnection myCon = new SqlConnection("user id=username;" + <br />
				    "password=password;server=localhost;" + <br />
				    "Trusted_Connection=yes;" + <br />
				"database=database; " + <br />
				"connection timeout=30");<br />
<br />
				UpdateDB = false;<br />
			<br />
			try<br />
			{<br />
				SqlDataAdapter da = new SqlDataAdapter(sSQL,myCon);<br />
				SqlCommandBuilder cb = new SqlCommandBuilder(da);<br />
				cb.GetInsertCommand();<br />
				cb.GetUpdateCommand();<br />
				da.Fill(dsDiff,"MidNight");<br />
			    da.Update(dsDiff);<br />
<br />
			}<br />
			catch(SqlException e)<br />
			{<br />
				string errorMessage = "Message: " + e.Message + "\n" +<br />
					"Source: " + e.Source + "\n" +<br />
					"State: " + e.State + "\n" +<br />
					"Procedure: " + e.Procedure + "\n";<br />
<br />
				System.Diagnostics.EventLog log = new System.Diagnostics.EventLog();<br />
				log.Source = "Web Service: wsMNMhzData Encountered an Error";<br />
				log.WriteEntry(errorMessage);<br />
				Console.WriteLine("An exception occurred. Please contact your system administrator.");<br />
			}<br />
<br />
			<br />
<br />
			<br />
			return true;<br />
		}<br />
<br />


Thanks,

JJ
GeneralRe: Diffgram Updates Pin
Mazdak6-May-04 7:45
Mazdak6-May-04 7:45 
GeneralRe: Diffgram Updates Pin
MrJJKoolJ6-May-04 8:30
MrJJKoolJ6-May-04 8:30 
GeneralRe: Diffgram Updates Pin
Mazdak6-May-04 8:36
Mazdak6-May-04 8:36 
Generalphp request Pin
Alex Getman6-May-04 6:09
Alex Getman6-May-04 6:09 
GeneralRe: php request Pin
Heath Stewart6-May-04 8:02
protectorHeath Stewart6-May-04 8:02 
GeneralRe: php request Pin
leppie6-May-04 9:13
leppie6-May-04 9:13 
GeneralRe: php request Pin
Alex Getman6-May-04 10:15
Alex Getman6-May-04 10:15 
GeneralRe: php request Pin
Heath Stewart6-May-04 10:24
protectorHeath Stewart6-May-04 10:24 
QuestionPassing Parameters using OnSelectedIndexChanged? Pin
stan286-May-04 6:07
stan286-May-04 6:07 
AnswerRe: Passing Parameters using OnSelectedIndexChanged? Pin
Mazdak6-May-04 6:57
Mazdak6-May-04 6:57 
GeneralRe: Passing Parameters using OnSelectedIndexChanged? Pin
leppie6-May-04 9:15
leppie6-May-04 9:15 
GeneralRe: Passing Parameters using OnSelectedIndexChanged? Pin
stan286-May-04 9:18
stan286-May-04 9:18 
GeneralRe: Passing Parameters using OnSelectedIndexChanged? Pin
Mazdak6-May-04 9:21
Mazdak6-May-04 9:21 
AnswerRe: Passing Parameters using OnSelectedIndexChanged? Pin
Jesse Squire7-May-04 1:47
Jesse Squire7-May-04 1:47 
GeneralNeedleman Wunsch Pin
NiteShade6-May-04 5:44
NiteShade6-May-04 5:44 
GeneralRe: Needleman Wunsch Pin
Jeff Varszegi6-May-04 6:10
professionalJeff Varszegi6-May-04 6:10 
GeneralRe: Needleman Wunsch Pin
NiteShade6-May-04 6:26
NiteShade6-May-04 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.