Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Rajesh Halyal
  Where is Rajesh Halyal?
 SANGLI
 India
 Rajesh Halyal
 To: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
Subject: RE: how to create a string of values that can be used to insert in SQL server
Thread ID: 110551 Message ID: 110675 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Saturday, October 21, 2006 4:42:24 AM         
   



***************************
***************************
Happy Diwali & Prosperous New Year
***************************
***************************


> > I am trying to create a string depending on the cursor fields & its
> > type to be used to pass it to insert command for SQL server.
> > I am having 2 problems
> > 1> How to include character fields with quotes, square brackets & other
> > special characters.
> > 2> How to send date fields.
> > -----------------------------------
> > Rajesh Halyal

> you can get vfp to do that for you with
>
> errcd=sqlexec(yourhandle,'insert into yourtable (yourcolumn) values (?yourcursor.yourfield)')
>
> the ? makes vfp do the replacing in the sql statement.
>
> if you want to create the string yourself, you have to escape the quotes with a backslash.
>
>
> regards
> tushar




-----------------------------------
Rajesh Halyal

ENTIRE THREAD