All I can suggest here is to have the script display the constructed value
of $sqlstatement. You may find it has an unexpected punctuation, or one of
the values is null (interestingly, ODBC didn't like null values even if they
were OK in the database - very odd). In my case, ODBC kept hurling until I
put the quotes around the string values, and it didn't like empty strings
('').
> -----Original Message-----
> From: SAWMaster [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 06, 2001 2:45 PM
> To: [EMAIL PROTECTED]
> Subject: This n' that
>
>
> Hi Kris! Looks like you have things well in hand.
>
> I'm not using Win32::ODBC for my little project, I'm using
> something called "DBI", I THINK that they do basically the
> same thing though...if I'm wrong someone please set me right.
>
> I've successfully put new data into my database from a web
> page at the time of this post now :) I have run into trouble
> doing it for the entire record set. I'll explain...
>
> My test of the process only put data into the first field of
> the record, and just left the rest blank. But it worked!
>
> So now I'm playing with this line...I think it's where my error is.
>
> $sqlstatement = "INSERT INTO Full (freq, loc, desc, freqtype,
> cat, call, tx) VALUES ($newfreq, $newloc, $newdesc,
> $newfreqtype, $newcat, $newcall, $newtx)";
>
> Can someone set me straight on this?
>
> I've also tried a few variations such as:
>
> $sqlstatement = "INSERT INTO Full (freq, loc, desc, freqtype,
> cat, call, tx) VALUES ($newfreq, '$newloc', '$newdesc',
> '$newfreqtype', '$newcat', '$newcall', $newtx)";
>
> and
>
> $sqlstatement = "INSERT INTO Full (freq, loc, desc, freqtype,
> cat, call, tx) VALUES ($newfreq, \'$newloc\', \'$newdesc\',
> \'$newfreqtype\', \'$newcat\', \'$newcall\', $newtx)";
>
> Because those fields are string types but that should not
> matter should it?
>
>
>