Re: "INSERT INTO" dropping slashes from strings

2004-05-08 Thread Lou Olsten
PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 04, 2004 6:02 PM Subject: "INSERT INTO" dropping slashes from strings > Every time I think I've got it, I am reminded thatI don't got it. > > Hello all, once again! Can anyone tell me why the foll

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Steve Pugh
Ah!! I was tripped up by the fact that things were fine when I was doing an ADO "recordset.addnew, recordset!Fieldname = variable", recordset.Update" kind of approach. Switching to an INSERT query, and sure enough the backslashes need a little escape. Don't we all need a little escape every n

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Daniel Clark
Hum. I've never tried inserting without the field names. > Serves me right to type this stuff instead of copying/pasting - my > previous post was indeed wrong but also wasn't the exact code I used > (yours was, with the single quote embedded in the doubles). > > It's been a very dyslexic week for

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Dan Nelson
In the last episode (May 04), Steve Pugh said: > Hello all, once again! Can anyone tell me why the following takes > place? In my VB app I am adding records to the table "Jobs" with > this code (trimmed way down - my actual INSERT statement populates > about 20 fields): > > sqlstr = "INSERT INTO

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Steve Pugh
Serves me right to type this stuff instead of copying/pasting - my previous post was indeed wrong but also wasn't the exact code I used (yours was, with the single quote embedded in the doubles). It's been a very dyslexic week for me. On your previous response regarding field names and case sen

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Daniel Clark
How about: (I reversed on set of quotes) sqlstr = "INSERT INTO Jobs VALUES('" & txtSceneFile & "')" > Err...what I meant to say here was "ascii code equivalent (chr(39)" (I > tried single *and* double quotes). Sorry about that. > > Steve Pugh wrote: > >> Hi Daniel, >> >> I tried that to no avai

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Daniel Clark
Check the table sturcture for required fields and EXACT field names. mysql is case sensitive. > I tried that to no avail (I had actually had the code set initially to > use single quotes thusly: > > sqlstr = "INSERT INTO Jobs VALUES("' & _ > txtSceneFile & "')" > > but it generated the

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Steve Pugh
Err...what I meant to say here was "ascii code equivalent (chr(39)" (I tried single *and* double quotes). Sorry about that. Steve Pugh wrote: Hi Daniel, I tried that to no avail (I had actually had the code set initially to use single quotes thusly: sqlstr = "INSERT INTO Jobs VALUES("' & _

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Steve Pugh
Hi Daniel, I tried that to no avail (I had actually had the code set initially to use single quotes thusly: sqlstr = "INSERT INTO Jobs VALUES("' & _ txtSceneFile & "')" but it generated the same erroneous string. Using the ascii-code equivalent (Chr(34) does the same. It's just so

Re: "INSERT INTO" dropping slashes from strings

2004-05-04 Thread Daniel Clark
I think you want chr(39) (single quote). > Every time I think I've got it, I am reminded thatI don't got it. > > Hello all, once again! Can anyone tell me why the following takes > place? In my VB app I am adding records to the table "Jobs" with this > code (trimmed way down - my actual INS

"INSERT INTO" dropping slashes from strings

2004-05-04 Thread Steve Pugh
Every time I think I've got it, I am reminded thatI don't got it. Hello all, once again! Can anyone tell me why the following takes place? In my VB app I am adding records to the table "Jobs" with this code (trimmed way down - my actual INSERT statement populates about 20 fields): sqlstr