Yea I often use something like TABLE: AGENTS COLUMNS: AGENT_ID, AGENT_NAME, ETC but I was kind of just thrown in to write this simple script querying an Access database created by non-database personnel
....back to the drawing board ----- Original Message ----- From: "dave" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Wednesday, May 24, 2006 9:17 PM Subject: Re: insert query error - ANY FIX IDEAS? > " Yea that might be it .. i'll switch it up .. but wouldnt the error state > THAT and not 'datatype mismatch' ??" > > It's microsoft so of course it wont...... > > here is a list, "name" is on there, I would check them all > http://support.microsoft.com/default.aspx?scid=kb;en-us;286335 > > FYI~ I name all my tables with a scheme, I don't use this one but a lot of people do, just prefix with something like tbl_ > > so name would be tbl_name > > most ppl use tbl_ but what I found is that if you use that and other ppls code (like phpbb) for example that they also prefix with tbl_ so I just made up my own so I always know which tables are mine. > > ~Dave the disruptor~ > > ---------------------------------------- > From: "Joe Velez" <[EMAIL PROTECTED]> > Sent: Thursday, May 25, 2006 12:11 AM > To: CF-Talk <[email protected]> > Subject: Re: insert query error - ANY FIX IDEAS? > > Yea that might be it .. i'll switch it up .. but wouldnt the error state > THAT and not 'datatype mismatch' ?? > > ----- Original Message ----- > From: "dave" > To: "CF-Talk" > Sent: Wednesday, May 24, 2006 8:48 PM > Subject: re: insert query error - ANY FIX IDEAS? > > > I think some of your table names are reserved words in access.. like > (name). > > I don't run access but I seem to recall Will having this problem. > > > > ~Dave the disruptor~ > > > > ---------------------------------------- > > From: "Joe Velez" > > Sent: Wednesday, May 24, 2006 11:44 PM > > To: CF-Talk > > Subject: insert query error - ANY FIX IDEAS? > > > > Here is a strange one. > > > > I'm running Access as the database. > > > > Before I get too much deeper the Format for the column is Yes/No (but the > values are 1/0) -- So maybe I need to insert Yes or No instead of 1 or 0 ??? > I'll try that .... > > > > I inserted "test" as a hard coded value in the last 2 columns sequentially > testing because the error was thrown (bold) there, and as I went through > each field adding hard coded values rather than dynamic data. So first > ORDERED_BY was throwing an error, then SN_NUM and now OEM_SERIAL_NUM > > > > My query is processed in a loop querying data from a seperate database w/ > the same columns -- inserting the data into the database I want to use. > [hope that made sense] > > > > The set values for the failed query are as follows: [ looping, f = > evaluate(f) > > ] > > > > ADV_EXCH = 0 > > BUS_DAYS_15 = > > CAL_DAYS_15_20 = 2005-04-04 00:00:00.0 > > CLASS_ID = HDD > > COMMENTS = P=170=E=120=C=50 > > CUSTOMER_NUM = 10029 > > DOA = 1 > > ID = 9397 > > INVOICE_NUM = 12713 > > ITEM_NUM = IBM08K9758E > > LATE_BILLABLE = 0 > > LOCATION = > > NAME = SIEMENS > > NTF = 0 > > OEM_SERIAL_NUM = 0 > > OPEN_BOX = 0 > > OPEN_STATIC_BAG = 0 > > ORDERED_BY = DENNIS > > ORDER_DATE = 2005-03-16 00:00:00.0 > > ORDER_NUM = 126018 > > OUTSTANDING = 1 > > PAYMENT_TYPE = 30 > > PO_NUM = 6883712 > > RA_NUM = 10029 > > REASON = ADV-EX > > RETURNED = 0 > > RETURN_DATE = > > SN_NUM = > > SPECIAL = 0 > > SURPLUS = 0 > > > > The query is: > > > > insert into return_authorization( > > ra_num, > > doa, > > adv_exch, > > surplus, > > special, > > order_date, > > bus_days_15, > > cal_days_15_20, > > customer_num, > > name, > > location, > > item_num, > > class_id, > > po_num, > > reason, > > return_date, > > comments, > > invoice_num, > > order_num, > > open_box, > > open_static_bag, > > oem_serial_num, > > sn_num, > > > > ordered_by) > > > > values( > > > > '#ra_num#', > > #doa#, > > #adv_exch#, > > #surplus#, > > #special#, > > '#dateformat(order_date, "mm/dd/yyyy")#', > > '#bus_days_15#', > > '#cal_days_15_20#', > > '#customer_num#', > > '#name#', > > '#location#', > > '#item_num#', > > '#class_id#', > > '#po_num#', > > '#reason#', > > '#dateformat(return_date, "mm/dd/yyyy")#', > > '#comments#', > > '#invoice_num#', > > '#order_num#', > > #open_box#, > > #open_static_bag#, > > '#oem_serial_num#', > > 'test', > > 'test') > > > > The error is: > > > > Error Executing Database Query. > > [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC > Microsoft Access Driver] Data type mismatch in criteria expression. > > > > The error occurred in F:\oemcfm\merge.cfm: line 68 > > Called from F:\oemcfm\index.cfm: line 40 > > Called from F:\oemcfm\merge.cfm: line 68 > > Called from F:\oemcfm\index.cfm: line 40 > > > > 66 : #open_box#, > > 67 : #open_static_bag#, > > 68 : '#oem_serial_num#', > > 69 : 'test', > > 70 : 'test') > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241417 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

