0

Hi guys i'm writing a vb program which got using the sql statement

i know the sql statement is using method insert

but my one is much different. The code concept is like this

If cmbActive= true then

sql=insert into staff_badgeTrackingNew = txtEmpID, txtEmpName, TxtID

Else
sql= insert into staff badgeTracking= txtEmpID, txtEmpName, txtID


If the proper code is how to write it can give me an example

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by vb5prgrmr
0

once again...

SQL = "INSERT INTO TableName(Field1Name, Field2Name, ...) VALUES(" & val(text1.text) & ",'" & text2.text & "')"

Where TableName is the name of your table
Where Field*Name is the name of the field you are going to add data to
Where val(text1.text) is adding a numeric value to Field1Name
Where '" & text2.text & "')" denotes adding text to Field2Name


Good Luck

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.