can't insert a date to table 
Author Message
 can't insert a date to table

hi all
i work with ado and access 2000
i use INSERT INTO command  and all the fields get into the table but
the one with the address format ,it makes an error and wont get into
the table .is there any limit about the format of text that i can use?

this is the insert line i use:
"INSERT INTO nots(branchname ,date, nots1, nots2 ) " _
             & " VALUES ('xxxx', '24/4/2001', 'xxxx','xxxx' );"

p.s
the fileds in access defined once as text and the other time as
'date/time '  both failed to eccept the date value

thanks eran



Mon, 13 Oct 2003 05:55:38 GMT  
 can't insert a date to table
Eran,

    I took the line below and tried it in Access 2000.  It kept telling me I
had a syntax error in my INSERT INTO statement and highlighted the column
name date.  I changed the column name to 'dat' and it worked fine.  I guess
date may be a reserved word in SQL? I dont know why Access lets you create a
column named 'date' if you cant update it. Can you change the column name
and try it?

scott


Quote:
> hi all
> i work with ado and access 2000
> i use INSERT INTO command  and all the fields get into the table but
> the one with the address format ,it makes an error and wont get into
> the table .is there any limit about the format of text that i can use?

> this is the insert line i use:
> "INSERT INTO nots(branchname ,date, nots1, nots2 ) " _
>              & " VALUES ('xxxx', '24/4/2001', 'xxxx','xxxx' );"

> p.s
> the fileds in access defined once as text and the other time as
> 'date/time '  both failed to eccept the date value

> thanks eran



Mon, 13 Oct 2003 04:32:49 GMT  
 can't insert a date to table

yes it was it thanks , i dont know how com access lets me create that
colume if the word date is reserved . its now works fine thanks again
for your help . see u in my next problem :)



Quote:
>Eran,

>    I took the line below and tried it in Access 2000.  It kept telling me I
>had a syntax error in my INSERT INTO statement and highlighted the column
>name date.  I changed the column name to 'dat' and it worked fine.  I guess
>date may be a reserved word in SQL? I dont know why Access lets you create a
>column named 'date' if you cant update it. Can you change the column name
>and try it?

>scott



>> hi all
>> i work with ado and access 2000
>> i use INSERT INTO command  and all the fields get into the table but
>> the one with the address format ,it makes an error and wont get into
>> the table .is there any limit about the format of text that i can use?

>> this is the insert line i use:
>> "INSERT INTO nots(branchname ,date, nots1, nots2 ) " _
>>              & " VALUES ('xxxx', '24/4/2001', 'xxxx','xxxx' );"

>> p.s
>> the fileds in access defined once as text and the other time as
>> 'date/time '  both failed to eccept the date value

>> thanks eran



Wed, 15 Oct 2003 12:29:50 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. 'Canned' data in VB program

2. Validate date from VB to insert into Oracle table

3. insert null Date into a table

4. Inserting current date into a contact's note field

5. Inserting today's date

6. inserting tomorrow's date into word documents

7. Can't put current date in an SQL INSERT

8. Insert doesn't work with dates

9. Insert a table and number don't restart

10. Inserting a picture in a Word table's cell

11. Appending an external file's date to a table

12. Formating tables' date fields in Text Box

 

 
Powered by phpBB® Forum Software