From: Rob Christiansen on
Below script works with a *.mdb file. Everthing worked fine in the past,
but the difference now is that "newdebit" and "newcredit" are now
type-currency. I don't know how to deliniate a currency-variable. For
example, type-date is deliniated with a #-sign, and a string-variable is
deliniated with a '-sign. A numeric has no deliniation at all. (I tried
this, however, and I get type-mismatch.)
//--------------------------------------------
SQL = "INSERT INTO books1 ";
SQL += "( fprevrec, fnextrec, fforegrnd, fbackgrnd, fyear, fmonth,
fbank, finitials, ftype, fcheck, fdate, fdescription, fdebit, fcredit,
";
SQL += "fproject, fmsc1, fmsc2, fmsc3, fmsc4, fmsc5, fmsc6, fmsc7 )
VALUES ( ";
SQL += ""+ newprevrec +", ";
SQL += ""+ newnextrec +", ";
SQL += " 'fcolor', ";
SQL += " 'bcolor', ";
SQL += "'"+ newyear +"', ";
SQL += "'"+ newmonth +"', ";
SQL += "'"+ newbank +"', ";
SQL += "'"+ newinitials +"', ";
SQL += "'"+ newtype +"', ";
SQL += "'"+ newcheck +"', ";
SQL += "'"+ newdate +"', ";
SQL += "'"+ newdescription +"', ";
SQL += ""+ newdebit +", "; //<-- currency
SQL += ""+ newcredit +", "; //<-- currency
SQL += "'"+ newproject +"', ";
SQL += "'"+ newmsc1 +"', ";
SQL += "'"+ newmsc2 +"', ";
SQL += "'"+ newmsc3 +"', ";
SQL += "'"+ newmsc4 +"', ";
SQL += "'"+ newmsc5 +"', ";
SQL += "'"+ newmsc6 +"', ";
SQL += "'"+ newmsc7 +"' )";

//
Response.Write( "SQL = "+ SQL +"<br>" );
//
ConnectionObject.Execute( SQL );



crazyswede

*** Sent via Developersdex http://www.developersdex.com ***