Click here to Skip to main content
15,927,745 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionScrollBar Pin
microuser_20003-Aug-06 3:13
microuser_20003-Aug-06 3:13 
AnswerRe: ScrollBar Pin
Dave Kreskowiak3-Aug-06 5:14
mveDave Kreskowiak3-Aug-06 5:14 
GeneralRe: ScrollBar Pin
microuser_20003-Aug-06 12:20
microuser_20003-Aug-06 12:20 
GeneralRe: ScrollBar Pin
Stephen McGuire3-Aug-06 13:58
Stephen McGuire3-Aug-06 13:58 
GeneralRe: ScrollBar Pin
Dave Kreskowiak3-Aug-06 15:04
mveDave Kreskowiak3-Aug-06 15:04 
GeneralRe: ScrollBar Pin
Stephen McGuire3-Aug-06 15:19
Stephen McGuire3-Aug-06 15:19 
GeneralRe: ScrollBar Pin
Dave Kreskowiak4-Aug-06 1:59
mveDave Kreskowiak4-Aug-06 1:59 
GeneralRe: ScrollBar Pin
Stephen McGuire4-Aug-06 2:10
Stephen McGuire4-Aug-06 2:10 
GeneralRe: ScrollBar Pin
microuser_20005-Aug-06 2:48
microuser_20005-Aug-06 2:48 
GeneralRe: ScrollBar Pin
microuser_20005-Aug-06 2:58
microuser_20005-Aug-06 2:58 
GeneralRe: ScrollBar Pin
Dave Kreskowiak5-Aug-06 3:49
mveDave Kreskowiak5-Aug-06 3:49 
GeneralRe: ScrollBar Pin
Dave Kreskowiak5-Aug-06 3:49
mveDave Kreskowiak5-Aug-06 3:49 
QuestionChanging color of the whole Tab control Pin
Rajiya3-Aug-06 1:22
Rajiya3-Aug-06 1:22 
AnswerRe: Changing color of the whole Tab control Pin
Dave Kreskowiak3-Aug-06 5:13
mveDave Kreskowiak3-Aug-06 5:13 
Questionhow to save a file into MS Access Table... Pin
Nouvand3-Aug-06 0:56
Nouvand3-Aug-06 0:56 
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 

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.