Showing results 1 to 7 of 7
Search took 0.00 seconds.
Posts Made By: Ken-Barrie
Forum: C# Jul 12th, 2008
Replies: 2
Views: 494
Posted By Ken-Barrie
Re: OLEDB QUERY If user input has ' query fails.

No one has picked this up, so I worked out a solution. There is a very useful “.Replace” method for strings which replaces all instances of a character eg \ or “. The code is correspondingly...
Forum: C# Jul 9th, 2008
Replies: 2
Views: 494
Posted By Ken-Barrie
Re: OLEDB QUERY If user input has ' query fails.

Well, seems I'll have to write to myself. After a bit of research and trial and error I came up with this code:

string SQL = "UPDATE Inventory SET" +
" Mask = " + Convert.ToInt32(mask) + "," +
"...
Forum: C# Jul 9th, 2008
Replies: 2
Views: 494
Posted By Ken-Barrie
OLEDB QUERY If user input has ' query fails.

When an Access database is being updated and an apostrophy ' is embedded in a user input string, (txtArray[0].Text here), the query fails. I am using OLEDB. I am hoping I do not have to parse each...
Forum: C# Jun 22nd, 2008
Replies: 2
Views: 597
Posted By Ken-Barrie
Re: Handler for an array of controls created in code

Yes. That will do nicely.

Your
textBox.Name = "Name" + i ;

becomes, for me
txtArray[i].Name = i.ToString();

[Shame on me. Why did I not think of giving them a name!]
Forum: C# Jun 21st, 2008
Replies: 4
Views: 4,318
Posted By Ken-Barrie
Re: how to check items of checked list box ?

I just posted a reply on this thread:
"How To pass multidimensional array from one form to another"

My reply should cover your requirement as well.
Forum: C# Jun 21st, 2008
Replies: 2
Views: 597
Posted By Ken-Barrie
Handler for an array of controls created in code

I create an array of 16 text boxes, etc in code. I need to detect which one is clicked. I have created an event handler for each that points to the same handler routine for all 16

for(int box = 0;...
Forum: C# Jun 21st, 2008
Replies: 6
Views: 1,851
Posted By Ken-Barrie
Re: How To pass multidimensional array from one form to another

Her is one way that can do what you ask and more.
//MAIN FORM

private frmOther varfrmOther; //Private var referencing frmOther declared at form level

//in frmMain’s Load event the form to be...
Showing results 1 to 7 of 7

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:32 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC