Click here to Skip to main content
15,886,026 members
Home / Discussions / C#
   

C#

 
QuestionHow to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
glitteringsound4-Sep-10 5:14
glitteringsound4-Sep-10 5:14 
AnswerRe: How to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
Not Active4-Sep-10 5:30
mentorNot Active4-Sep-10 5:30 
AnswerRe: How to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
dan!sh 4-Sep-10 5:33
professional dan!sh 4-Sep-10 5:33 
AnswerRe: How to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
PIEBALDconsult4-Sep-10 5:59
mvePIEBALDconsult4-Sep-10 5:59 
GeneralRe: How to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
dan!sh 4-Sep-10 7:41
professional dan!sh 4-Sep-10 7:41 
GeneralRe: How to determine and check whether a type in assembly is Custom type or Primitive type using reflection in .NET? Pin
PIEBALDconsult6-Sep-10 18:35
mvePIEBALDconsult6-Sep-10 18:35 
Questionhow to update listView on all clients machines when new data was added? Pin
kai-best4-Sep-10 5:06
kai-best4-Sep-10 5:06 
AnswerRe: how to update listView on all clients machines when new data was added? Pin
Not Active4-Sep-10 5:41
mentorNot Active4-Sep-10 5:41 
A couple of things to point out first.

string myConnectionString = "SERVER=localhost;" + "DATABASE=database;" + "UID=root;" + "PASSWORD=123123;";

There is no need for the string concatenation here. You can have it one string as you are doing in your button event. You should also have this string defined in one place, say a CONST at the top of your file. That way you avoid issues of changing the string in multiple location and possibly forgetting one.

string sql = "INSERT INTO table VALUES ('', '" + textBox1.Text + "', '" +textBox2.Text + "', '" + textBox3.Text + "', '0', '0', '0', '0', '0', '0', '0')";

Never, ever, ever, accept un-validated user input and place it in your sql command. You are asking for a SQL injection attack. Yes, this app is only a small local instance, but learn to do it correctly.

As for the notification. Since you are using mySql it doesn't have the capabilities that SQL Server has so you will have to poll the database occasionally to check for updates. Or develop a complex method of shared communication between the instances of the app.

I know the language. I've read a book. - _Madmatt

GeneralRe: how to update listView on all clients machines when new data was added? Pin
kai-best5-Sep-10 2:23
kai-best5-Sep-10 2:23 
GeneralRe: how to update listView on all clients machines when new data was added? Pin
Not Active5-Sep-10 2:59
mentorNot Active5-Sep-10 2:59 
GeneralRe: how to update listView on all clients machines when new data was added? Pin
OriginalGriff5-Sep-10 4:12
mveOriginalGriff5-Sep-10 4:12 
GeneralRe: how to update listView on all clients machines when new data was added? Pin
Not Active5-Sep-10 5:07
mentorNot Active5-Sep-10 5:07 
GeneralRe: how to update listView on all clients machines when new data was added? Pin
OriginalGriff5-Sep-10 5:15
mveOriginalGriff5-Sep-10 5:15 
AnswerRe: how to update listView on all clients machines when new data was added? Pin
OriginalGriff4-Sep-10 6:05
mveOriginalGriff4-Sep-10 6:05 
GeneralRe: how to update listView on all clients machines when new data was added? Pin
kai-best5-Sep-10 2:29
kai-best5-Sep-10 2:29 
AnswerRe: how to update listView on all clients machines when new data was added? Pin
kai-best5-Sep-10 2:44
kai-best5-Sep-10 2:44 
GeneralRe: how to update listView on all clients machines when new data was added? Pin
OriginalGriff5-Sep-10 4:10
mveOriginalGriff5-Sep-10 4:10 
GeneralRe: how to update listView on all clients machines when new data was added? [modified] Pin
kai-best6-Sep-10 3:22
kai-best6-Sep-10 3:22 
QuestionRule Engine Pin
Shubhabrata Mohanty4-Sep-10 3:45
Shubhabrata Mohanty4-Sep-10 3:45 
AnswerRe: Rule Engine Pin
dan!sh 4-Sep-10 4:40
professional dan!sh 4-Sep-10 4:40 
QuestionUpdating a progress bar in a loop Pin
Keith Vitali4-Sep-10 2:25
Keith Vitali4-Sep-10 2:25 
AnswerRe: Updating a progress bar in a loop Pin
Henry Minute4-Sep-10 3:25
Henry Minute4-Sep-10 3:25 
GeneralRe: Updating a progress bar in a loop Pin
Keith Vitali4-Sep-10 4:26
Keith Vitali4-Sep-10 4:26 
AnswerRe: Updating a progress bar in a loop Pin
PIEBALDconsult4-Sep-10 3:47
mvePIEBALDconsult4-Sep-10 3:47 
GeneralRe: Updating a progress bar in a loop Pin
Keith Vitali4-Sep-10 4:46
Keith Vitali4-Sep-10 4:46 

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.