Jhakda 0 Newbie Poster

Hi All
I am working on a Excel VBA proj. I ahve to insert some records in the Access Db. Right now I am forming the query as a string, creating a connection and executing the query
Eg:
"Insert into Table1 values ('A','B','Comments')"

Now if the comments or any other field contains a single quote('),my query bombs.
I read about parameterized queries,just like a PreparedStament query in java,can similar thing be done inVBA. An example would be highly appreciated.

Thanks

Jhakda

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.