crazyswede Posted May 28, 2010 Share Posted May 28, 2010 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 +", "; //<-- currencySQL += ""+ newcredit +", "; //<-- currencySQL += "'"+ newproject +"', ";SQL += "'"+ newmsc1 +"', "; SQL += "'"+ newmsc2 +"', "; SQL += "'"+ newmsc3 +"', "; SQL += "'"+ newmsc4 +"', "; SQL += "'"+ newmsc5 +"', "; SQL += "'"+ newmsc6 +"', "; SQL += "'"+ newmsc7 +"' )"; //Response.Write( "SQL = "+ SQL +"<br>" ); //ConnectionObject.Execute( SQL ); Link to comment Share on other sites More sharing options...
justsomeguy Posted May 28, 2010 Share Posted May 28, 2010 I don't think currency has a delimiter. What does it show when you print the query? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.