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

C#

 
Questionpossibly a question without a awnser ? Pin
jtmtv186-Feb-03 23:11
jtmtv186-Feb-03 23:11 
AnswerRe: possibly a question without a awnser ? Pin
Philip Fitzsimons6-Feb-03 23:37
Philip Fitzsimons6-Feb-03 23:37 
GeneralRe: possibly a question without a awnser ? Pin
leppie7-Feb-03 11:09
leppie7-Feb-03 11:09 
QuestionStructure array is the member another structure? Pin
JuhaKa6-Feb-03 23:03
JuhaKa6-Feb-03 23:03 
AnswerRe: Structure array is the member another structure? Pin
leppie7-Feb-03 11:19
leppie7-Feb-03 11:19 
GeneralException creating a control Pin
chito6-Feb-03 16:03
chito6-Feb-03 16:03 
GeneralRe: Exception creating a control Pin
James T. Johnson6-Feb-03 18:42
James T. Johnson6-Feb-03 18:42 
QuestionHow can I make Command at runtime? Pin
bania6-Feb-03 15:40
bania6-Feb-03 15:40 
public void ExeQueryCmdArray(NewDBClass.DbName dbName, String[] sQuery) 		
{
	this.dbNameCache = dbName;
	this.DbInstance(dbName);
	OleDbCommand cmdCommon1	;
	OleDbCommand cmdCommon2	;
	OleDbCommand cmdCommon3	;
	try
	{
		this.conOleDb.Open();
		this.transOleDb = this.conOleDb.BeginTransaction();
		switch (sQuery.Length)
		{
			case 2:
			cmdCommon1 = new OleDbCommand(sQuery[0],conOleDb,transOleDb);
			cmdCommon2 = new OleDbCommand(sQuery[1],conOleDb,transOleDb);
			cmdCommon1.ExecuteNonQuery();
			cmdCommon2.ExecuteNonQuery();
			break;
			case 3:
			cmdCommon1 = new OleDbCommand(sQuery[0],conOleDb,transOleDb);
			cmdCommon2 = new OleDbCommand(sQuery[1],conOleDb,transOleDb);
			cmdCommon3 = new OleDbCommand(sQuery[2],conOleDb,transOleDb);
			cmdCommon1.ExecuteNonQuery();
			cmdCommon2.ExecuteNonQuery();
			cmdCommon3.ExecuteNonQuery();
			break;
		}

		this.transOleDb.Commit();
	}
	catch(System.Data.OleDb.OleDbException oe)
	{
		ExceptionClass.PrintException(oe.Message);
		this.transOleDb.Rollback();
	}
	catch(System.Exception e)
	{
		ExceptionClass.PrintException(e.Message);
		this.transOleDb.Rollback();
	}
	finally
	{
		this.conOleDb.Close();
	}
}

I use Access Database, and I want to execute various Insert and Update Query strings.
As you know, That code is very annoying me. So, I'd like to change using [for Loop].
But, I don't know How To...

Is there anyone can help me..
Thanks!!
AnswerRe: How can I make Command at runtime? Pin
leppie6-Feb-03 21:53
leppie6-Feb-03 21:53 
GeneralThanks a lot!! Pin
bania7-Feb-03 3:32
bania7-Feb-03 3:32 
Questionassociate an object with datagrid's row ? Pin
Paresh Gheewala6-Feb-03 14:11
Paresh Gheewala6-Feb-03 14:11 
QuestionDrawString Diagonally on Image object? Pin
wkoch6-Feb-03 10:23
wkoch6-Feb-03 10:23 
AnswerRe: DrawString Diagonally on Image object? Pin
Paresh Gheewala6-Feb-03 10:43
Paresh Gheewala6-Feb-03 10:43 
AnswerRe: DrawString Diagonally on Image object? Pin
James T. Johnson6-Feb-03 15:37
James T. Johnson6-Feb-03 15:37 
GeneralRe: DrawString Diagonally on Image object? Pin
b99koch17-Mar-03 9:58
sussb99koch17-Mar-03 9:58 
GeneralManaged DirectDraw Pin
Tomas Petricek6-Feb-03 9:49
Tomas Petricek6-Feb-03 9:49 
GeneralUsing Bitmap.Save(FileName, ImageFormat.Icon) Pin
draco_iii6-Feb-03 8:28
draco_iii6-Feb-03 8:28 
GeneralRe: Using Bitmap.Save(FileName, ImageFormat.Icon) Pin
Paresh Gheewala6-Feb-03 9:32
Paresh Gheewala6-Feb-03 9:32 
GeneralRe: Using Bitmap.Save(FileName, ImageFormat.Icon) Pin
draco_iii6-Feb-03 11:55
draco_iii6-Feb-03 11:55 
GeneralWhich PixelFormat. to use Pin
draco_iii6-Feb-03 14:54
draco_iii6-Feb-03 14:54 
GeneralShow System Menu on a borderless form Pin
Peter Dedene6-Feb-03 7:58
Peter Dedene6-Feb-03 7:58 
Generalproblem with saving XML to xml file Pin
Wizard_016-Feb-03 5:33
Wizard_016-Feb-03 5:33 
GeneralRe: problem with saving XML to xml file Pin
Paresh Gheewala6-Feb-03 7:46
Paresh Gheewala6-Feb-03 7:46 
GeneralRe: problem with saving XML to xml file Pin
Ryan Cromwell7-Feb-03 9:23
Ryan Cromwell7-Feb-03 9:23 
GeneralSerialization Pin
Filip Strugar6-Feb-03 4:56
Filip Strugar6-Feb-03 4:56 

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.