carlosweiss
Programmer
Hi,
I'm also new to VB and I'm used to working with SQL statements. From a previous thread I read that the way to use an Insert SQL looks like this:
I tried to use that code but I get a syntax error at the very beginning: "the defined type has not been defined by the user", pointing to the "Database" reserved word.
I'm using VB 6.0, and this code is within a form. I have a Data control with which I could use an SQL SELECT statement, but now I want to use an INSERT that is different to the recordSource columns defined there. What am I forgetting?
Thanks,
Carlos
I'm also new to VB and I'm used to working with SQL statements. From a previous thread I read that the way to use an Insert SQL looks like this:
Code:
Dim dbUsers As Database
Call Initialize_Form
Dim rsUSER_INFO As Recordset
Set dbUsers = OpenDatabase("c:\PESCE\PESCE.mdb")
sqlaction = "INSERT INTO table1 (field1) VALUES (1)"
dbUsers.Execute sqlaction
dbUsers.Close
I tried to use that code but I get a syntax error at the very beginning: "the defined type has not been defined by the user", pointing to the "Database" reserved word.
I'm using VB 6.0, and this code is within a form. I have a Data control with which I could use an SQL SELECT statement, but now I want to use an INSERT that is different to the recordSource columns defined there. What am I forgetting?
Thanks,
Carlos