Click here to Skip to main content
15,914,323 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL Server 2000 connection problem Pin
Nouman Bhatti8-Jul-07 21:57
Nouman Bhatti8-Jul-07 21:57 
Questiondisplay stored procedure format..........., Pin
Member 38798818-Jul-07 21:16
Member 38798818-Jul-07 21:16 
AnswerRe: display stored procedure format..........., Pin
Pete O'Hanlon8-Jul-07 23:06
mvePete O'Hanlon8-Jul-07 23:06 
GeneralRe: display stored procedure format..........., Pin
Member 38798819-Jul-07 0:05
Member 38798819-Jul-07 0:05 
GeneralRe: display stored procedure format..........., Pin
Pete O'Hanlon9-Jul-07 0:28
mvePete O'Hanlon9-Jul-07 0:28 
QuestionExporting and Importing Pin
M. J. Jaya Chitra8-Jul-07 21:04
M. J. Jaya Chitra8-Jul-07 21:04 
AnswerRe: Exporting and Importing Pin
Harini N K9-Jul-07 19:21
Harini N K9-Jul-07 19:21 
QuestionProblem Insert data into MySQL using ASP.NET Pin
drexler_kk8-Jul-07 17:24
drexler_kk8-Jul-07 17:24 
I am a beginner here for ASP.NET. I can't manage to insert data using ASP.NET. I have successful using the same connection string to do SELECT statement,but I'm wondering how to do INSERT statement to MySQL database. Please give me some solution here.


This is my code:

Imports System.Data.Odbc

Dim strConnString As String = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;option=3;Database=MyDatabase;Uid=root;Pwd=Pass;"
Dim ObjConn As New OdbcConnection(strConnString)
Dim ObjRead As OdbcDataReader
Dim ObjComm As OdbcCommand

Try

ObjComm = New OdbcCommand("INSERT INTO member_1(Member_ID,Username,Gender,Email,Contact_No,Address,Password)VALUES('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "'", ObjConn)

If (TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Or TextBox6.Text = "" Or TextBox7.Text = "") Then

Else
ObjConn.Open()
ObjComm.ExecuteNonQuery()
ObjConn.Close()
End If

Catch ex As Exception
Console.WriteLine(e.ToString())
End Try

Anyone can give me some solution here?

Thank you for readings.

Regards
Drex
AnswerRe: Problem Insert data into MySQL using ASP.NET Pin
N a v a n e e t h8-Jul-07 21:33
N a v a n e e t h8-Jul-07 21:33 
GeneralRe: Problem Insert data into MySQL using ASP.NET Pin
drexler_kk8-Jul-07 22:21
drexler_kk8-Jul-07 22:21 
QuestionBinding a datagridview to a binding source Pin
steve_rm8-Jul-07 12:13
steve_rm8-Jul-07 12:13 
QuestionSelect by date Pin
Sam Heller8-Jul-07 5:39
Sam Heller8-Jul-07 5:39 
AnswerRe: Select by date Pin
Mike Dimmick8-Jul-07 11:49
Mike Dimmick8-Jul-07 11:49 
GeneralRe: Select by date Pin
Sam Heller8-Jul-07 11:51
Sam Heller8-Jul-07 11:51 
AnswerRe: Select by date Pin
Thomas Chester9-Jul-07 7:53
Thomas Chester9-Jul-07 7:53 
QuestionUse ' one quotation make error with sql statmetn .. Pin
kindman_nb8-Jul-07 3:47
kindman_nb8-Jul-07 3:47 
AnswerRe: Use ' one quotation make error with sql statmetn .. Pin
Sam Heller8-Jul-07 5:51
Sam Heller8-Jul-07 5:51 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
kindman_nb8-Jul-07 10:58
kindman_nb8-Jul-07 10:58 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
Sam Heller8-Jul-07 11:05
Sam Heller8-Jul-07 11:05 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
kindman_nb8-Jul-07 11:52
kindman_nb8-Jul-07 11:52 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
Sam Heller8-Jul-07 11:53
Sam Heller8-Jul-07 11:53 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
N a v a n e e t h8-Jul-07 23:03
N a v a n e e t h8-Jul-07 23:03 
Questiongetting error "“Invalid object name 'SizeMst'. “ " while exec sp Pin
mohd imran abdul aziz6-Jul-07 20:08
mohd imran abdul aziz6-Jul-07 20:08 
Questiona month all dates want to display..., Pin
Member 38798816-Jul-07 18:14
Member 38798816-Jul-07 18:14 
AnswerRe: a month all dates want to display..., Pin
Mike Dimmick7-Jul-07 2:32
Mike Dimmick7-Jul-07 2:32 

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.