Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
SQL SERVER >>  A FEW TIPS WHEN TARGETING A SQL SERVER BACKEND

  Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass



Just a few tips when targeting a SQL-Server backend.

1. SQL-Server does not like blank dates from local VFP cursors to a SQL-Server backend. So set the default date in the SQL-Server backend to be: "01/01/1901 12:00:00 PM". In this way the .NULL. date in the SQL-Server table when queried into a local VFP cursor holds a valid date that will not fail with the Update, or Insert command if you use generic update and insert functions to write to the SQL-Server backend table.

2. Varchar fields in SQL-Server greater than 254 characters in length will be brought into a local VFP cursor as a Memo field. If you need only a short commentary input, restrict to 254 characters in length in the Varchar field in the SQL-Server backend. If you need greater that this then you have to use the EditBox object to see the VFP memo field interpretation of the SQL-Server Varchar feild greater that 254 characters in length.

3. If you are tired of using SQLEXEC with very long field and value lists please see my thread http://www.foxite.com/archives/0000108058.htm.

4. ComboBoxes, as listboxes are a pain in the butt when dealing with a real-time system that you want to display a record choice selection with a SQL-Select statement that is called each time you click on the Combobox. I moved to a command button that fires off a popup that adds the selected value into a textbox bound to local VFP cursor. I found in a drilldown approch the ComboBoxes were more trouble than they were worth.

FEEDBACK


Your Name: 
Your Feedback: 

Spam Protection:
Enter the code shown: