Click here to Skip to main content
15,914,447 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to save a file into MS Access Table... Pin
Kschuler3-Aug-06 2:59
Kschuler3-Aug-06 2:59 
GeneralRe: how to save a file into MS Access Table... Pin
Nouvand3-Aug-06 16:29
Nouvand3-Aug-06 16:29 
AnswerRe: how to save a file into MS Access Table... Pin
Stephen McGuire3-Aug-06 12:12
Stephen McGuire3-Aug-06 12:12 
GeneralRe: how to save a file into MS Access Table... Pin
Nouvand3-Aug-06 16:52
Nouvand3-Aug-06 16:52 
AnswerRe: how to save a file into MS Access Table... Pin
Nouvand3-Aug-06 21:48
Nouvand3-Aug-06 21:48 
GeneralRe: how to save a file into MS Access Table... Pin
Stephen McGuire4-Aug-06 1:01
Stephen McGuire4-Aug-06 1:01 
GeneralRe: how to save a file into MS Access Table... Pin
Nouvand7-Aug-06 21:07
Nouvand7-Aug-06 21:07 
Questioninsert syntax problem, pls help.... Pin
kyosugi2-Aug-06 23:38
kyosugi2-Aug-06 23:38 
posted b4 but i cant seem to find the old thread
n i need help urgently >.<

tis is the code i tried to use
---------

Private Sub AddSubmitB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddSubmitB.Click
Dim strcon As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Jasmine\db.mdb"
Dim cmd As New OleDb.OleDbCommand
Dim con As OleDb.OleDbConnection

Dim strsql As String
con = New OleDb.OleDbConnection(strcon)
con.Open()

strsql = "Insert into member (BorrowerId, password, MemberType, Fname, Lname, Gender, Address1, Address2, Address3, ContactNo, HandPhNo, Email, CourseOfStudy, EnrolledDate, ExpiryDate) values ('" & StudIdTB.Text & "','" & StudPwTB.Text & "','" & UgTB.Text & "','" & StudFnTB.Text & "','" & StudLnTB.Text & "','" & StudGenderCLB.Text & "','" & StudAdd1TB.Text & "','" & StudAdd2TB.Text & "','" & StudAdd3TB.Text & "','" & StudHmTB.Text & "','" & StudHpTB.Text & "','" & StudMailTB.Text & "','" & CosCB.Text & "','" & EnrolledCB.Text & "','" & ExpiryCB.Text & "')"

cmd.Connection = con
cmd.CommandText = strsql
cmd.ExecuteNonQuery()

con.Close()

MsgBox("New Member Added!")
Me.Close()

End Sub
---------
when i tested it today, it did not work
the debugger stopped at cmd.ExecuteNonQuery
it says
OleDbException was unhandled
Syntax error in INSERT INTO statement.

i checked thru my database and the sql statements n r fine, oso tried adding square brackets

how to solve?
AnswerRe: insert syntax problem, pls help.... Pin
Nouvand3-Aug-06 0:59
Nouvand3-Aug-06 0:59 
AnswerRe: insert syntax problem, pls help.... Pin
Dave Kreskowiak3-Aug-06 1:33
mveDave Kreskowiak3-Aug-06 1:33 
GeneralRe: insert syntax problem, pls help.... Pin
kyosugi3-Aug-06 7:42
kyosugi3-Aug-06 7:42 
AnswerRe: insert syntax problem, pls help.... Pin
Stephen McGuire3-Aug-06 12:38
Stephen McGuire3-Aug-06 12:38 
QuestionTo make characters in the text of TextBox ReadOnly. Pin
Prodigy2012-Aug-06 23:02
Prodigy2012-Aug-06 23:02 
AnswerRe: To make characters in the text of TextBox ReadOnly. Pin
kyosugi2-Aug-06 23:31
kyosugi2-Aug-06 23:31 
GeneralRe: To make characters in the text of TextBox ReadOnly. Pin
Prodigy2013-Aug-06 0:43
Prodigy2013-Aug-06 0:43 
AnswerRe: To make characters in the text of TextBox ReadOnly. Pin
Dave Kreskowiak3-Aug-06 1:31
mveDave Kreskowiak3-Aug-06 1:31 
AnswerRe: To make characters in the text of TextBox ReadOnly. Pin
Stephen McGuire3-Aug-06 7:35
Stephen McGuire3-Aug-06 7:35 
Questioninvoice in data report..? Pin
campbells2-Aug-06 22:52
campbells2-Aug-06 22:52 
Questioncontext menu in listview???(complex)[VB6] Pin
giddy_guitarist2-Aug-06 21:37
giddy_guitarist2-Aug-06 21:37 
AnswerFLASE ALARM Pin
giddy_guitarist3-Aug-06 7:53
giddy_guitarist3-Aug-06 7:53 
QuestionQuestion about Resizing and Manipulating program windows in VB Pin
litestep232-Aug-06 14:34
litestep232-Aug-06 14:34 
QuestionWeird email problem [modified] Pin
eagertolearn2-Aug-06 13:37
eagertolearn2-Aug-06 13:37 
AnswerRe: Weird email problem Pin
Christian Graus2-Aug-06 14:04
protectorChristian Graus2-Aug-06 14:04 
GeneralRe: Weird email problem Pin
eagertolearn3-Aug-06 4:48
eagertolearn3-Aug-06 4:48 
GeneralRe: Weird email problem Pin
VK-Cadec4-Aug-06 5:04
VK-Cadec4-Aug-06 5:04 

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.