IonicWind Software

IWBasic => Database => Topic started by: chris on August 05, 2008, 10:39:58 PM

Title: more help with databases
Post by: chris on August 05, 2008, 10:39:58 PM
ok i've tried everyting i could think of and i have no idea why this is not working the error i get is
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

there is something wrong with this line i just don't know what any and all help is welcome

dbExecSQL(pdb,"INSERT INTO WebSite (WebSite, HashCode, DateTime) VALUES ('" + WebSite +"', '"+ HashCode4+"', '"+ DateTime+"')" )

thanks in advance
chris
Title: Re: more help with databases
Post by: LarryMc on August 05, 2008, 11:18:02 PM
I don't see anything on the surface.

since all 3 variables are in '  ' I assume you have declared all 3 as strings or Istrings
If any are declared as int then you have to do a str$(blah) to pass them and don't use  '   ' on numbers
I would also assume you created the table properly on the field types.

I wonder if it doesn't like the table and a field in the table having the same name.

I can't remember if table names or fields are case sensitive.

I would try the statement with just one of the fields being loaded and not the table name one.


You just didn't ME much to work with.

Larry
Title: Re: more help with databases
Post by: chris on August 11, 2008, 12:46:27 PM
thnaks for trying even if I didn't give a lot to work with i got it working turns out i was trying to stick a varable that didn't have anything in it in the database