Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Seth Ford   on Sep 29 In MS Office Category.

  
Question Answered By: Jawna Mohammad   on Sep 29

I haven't used SQL in VBA for Access in a long time (++years)
I use SQL in VBA for Oracle daily.
To insert  the value into a varchar field, shouldn't the string  be delimited?

So the resulting string would be:


Insert into db Values('February 2008 -"Inventory"')

(note the single quotes as delimiters)
So, your VBA code  would be:

sSQL = "Insert into db Values('" & cr & "')"

I'm not 100% positive about the MSAccess applicability.
Especially, since in Oracle, I would have to specify the field names in the db.

sSQL = "Insert into db (datefield) Values('" & cr & "')"

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Double Quotation on String Value Or get search suggestion and latest updates.


Tagged: