Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
AnswerRe: Cell click coordinates Pin
Chazzysb16-Jul-09 1:04
Chazzysb16-Jul-09 1:04 
QuestionErase a windows event log Pin
Md. Marufuzzaman16-Jul-09 0:15
professionalMd. Marufuzzaman16-Jul-09 0:15 
AnswerRe: Erase a windows event log Pin
Pete O'Hanlon16-Jul-09 0:28
mvePete O'Hanlon16-Jul-09 0:28 
GeneralRe: Erase a windows event log Pin
Luc Pattyn16-Jul-09 1:27
sitebuilderLuc Pattyn16-Jul-09 1:27 
Questionsorting problem in outlook Pin
john563216-Jul-09 0:11
john563216-Jul-09 0:11 
QuestionC# How to HttpWebRequest through chain/cascade of proxy servers Pin
lermi15-Jul-09 23:55
lermi15-Jul-09 23:55 
Questionhow to drag and drop values from one datagrid to another datagrid? Pin
swetha_insoft15-Jul-09 23:41
swetha_insoft15-Jul-09 23:41 
AnswerRe: how to drag and drop values from one datagrid to another datagrid? Pin
swetha_insoft16-Jul-09 0:14
swetha_insoft16-Jul-09 0:14 
Questioncompression of webcam images [modified] Pin
shekhar25839515-Jul-09 23:08
shekhar25839515-Jul-09 23:08 
AnswerRe: compression of webcam images Pin
Manas Bhardwaj15-Jul-09 23:16
professionalManas Bhardwaj15-Jul-09 23:16 
AnswerRe: compression of webcam images Pin
Christian Graus16-Jul-09 1:30
protectorChristian Graus16-Jul-09 1:30 
QuestionServicePointManager.ServerCertificateValidationCallback Pin
himuskanhere15-Jul-09 21:36
himuskanhere15-Jul-09 21:36 
AnswerRe: ServicePointManager.ServerCertificateValidationCallback Pin
jo H20-Jul-09 4:47
jo H20-Jul-09 4:47 
QuestionRecord Not Insert Pin
mjawadkhatri15-Jul-09 21:31
mjawadkhatri15-Jul-09 21:31 
AnswerRe: Record Not Insert Pin
Mycroft Holmes15-Jul-09 22:06
professionalMycroft Holmes15-Jul-09 22:06 
GeneralRe: Record Not Insert Pin
mjawadkhatri15-Jul-09 22:21
mjawadkhatri15-Jul-09 22:21 
GeneralRe: Record Not Insert Pin
K030615-Jul-09 23:01
K030615-Jul-09 23:01 
GeneralRe: Record Not Insert Pin
mjawadkhatri15-Jul-09 23:21
mjawadkhatri15-Jul-09 23:21 
GeneralRe: Record Not Insert Pin
K030615-Jul-09 23:33
K030615-Jul-09 23:33 
AnswerRe: Record Not Insert Pin
Tom Deketelaere15-Jul-09 23:22
professionalTom Deketelaere15-Jul-09 23:22 
AnswerRe: Record Not Insert Pin
Pete O'Hanlon15-Jul-09 23:30
mvePete O'Hanlon15-Jul-09 23:30 
Where to start?

  1. Give your variables meaningful names. At a glance, what does textBox1 do?
  2. Your code is wide open to a SQL Injection attack. You need to look into using parameterised queries here.
  3. Your insert statement does nothing. You create the command text and then close the connection - you need to execute the command using cmd.ExecuteNonQuery();
  4. You have no exception handling. What happens if you can't connect the database, for instance?

If you had bothered to debug your code, you would have found the problem out in an instant. Learning to debug is one of the most valuable lessons you can master as a developer, and you should learn how to do it before too much longer.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



QuestionAccessing Serial Port Remotely Pin
Liya Kebede15-Jul-09 21:16
Liya Kebede15-Jul-09 21:16 
AnswerRe: Accessing Serial Port Remotely Pin
Garth J Lancaster16-Jul-09 0:38
professionalGarth J Lancaster16-Jul-09 0:38 
AnswerRe: Accessing Serial Port Remotely Pin
monstale16-Jul-09 0:52
monstale16-Jul-09 0:52 
GeneralRe: Accessing Serial Port Remotely Pin
Liya Kebede16-Jul-09 2:07
Liya Kebede16-Jul-09 2:07 

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.