473,395 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

help me about this insert command

Expand|Select|Wrap|Line Numbers
  1. Dim sql03 As String
  2. Set rsopen3 = New ADODB.Recordset
  3. nameq = txtSname.Text & "," & txtFname.Text & " " & txtMname.Text & "."
  4. sql03 = "insert into Faculty (facultyID,Name,Hired) values ('FAC" & Format$(rsInc, "0000") & "' , '" & nameq & "' , '" & Format$(Now(), "dd/mm/yyyy") & "'"
  5. rsopen3.Open sql03, cnString, adOpenStatic, adLockOptimistic
I'm having trouble with my insert statement! Whenever I run the program, the system says "Syntax error in insert statement!" Can someone tell me what's the problem in that? Thanks!! newbie question!! >.>
Jan 22 '08 #1
2 1005
kadghar
1,295 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. Dim sql03 As String
  2. Set rsopen3 = New ADODB.Recordset
  3. nameq = txtSname.Text & "," & txtFname.Text & " " & txtMname.Text & "."
  4. sql03 = "insert into Faculty (facultyID,Name,Hired) values ('FAC" & Format$(rsInc, "0000") & "' , '" & nameq & "' , '" & Format$(Now(), "dd/mm/yyyy") & "'"
  5. rsopen3.Open sql03, cnString, adOpenStatic, adLockOptimistic
I'm having trouble with my insert statement! Whenever I run the program, the system says "Syntax error in insert statement!" Can someone tell me what's the problem in that? Thanks!! newbie question!! >.>
i didnt check it well, but it seems that the only problem is that you're missing a parenthesis.
Jan 22 '08 #2
i didnt check it well, but it seems that the only problem is that you're missing a parenthesis.
waaaaaaa!! thnx alot!! i miss something, and now it works..
Jan 22 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike Chirico | last post by:
Hopefully this will help someone... Helpful Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Last Updated: Fri Apr 16 11:47:34 EDT 2004 The latest version of this...
3
by: Shapper | last post by:
Hello, I have created 3 functions to insert, update and delete an Access database record. The Insert and the Delete code are working fine. The update is not. I checked and my database has all...
28
by: Siv | last post by:
Hi, If I run the following: strSQL = "Select * FROM Clients;" da = New OleDb.OleDbDataAdapter(strSQL, Conn) 'Create data adapter cb = New OleDb.OleDbCommandBuilder(da) ...
2
by: Marty Meyers | last post by:
I have the following line in a php file: $msg= exec("perl $scriptPath/insert.pl $d $u $t 2>&1", $returnVal); Can someone explain the "2>&1" argument? Second problem, this same line of code...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
7
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason...
3
by: david | last post by:
I have following code, but I do not know where the problem is. Thank you for any help. David ----Code--- 'connection conn = New SqlConnection _ ("data source=localhost;integrated...
13
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table...
7
by: Ray | last post by:
hi, I have a question about how to use .grid_forget (in python/TK) I need to work on grid repeatly. everytime when a button is pressed, the rows of grid is different. such like, first time, it...
3
by: rizwanrazzaq | last post by:
Hi friends here is my coding.. but i m facing one problem .. i used both mathod SQL mathod and open Record Set. but in both i m getting error massage can anyone help me out regarding thi. Please...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.