Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert into an SQL table from VFP
Message
From
17/09/2001 02:28:47
 
 
To
17/09/2001 00:28:09
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00557153
Message ID:
00557169
Views:
17
Hi!

Try Upsizing wizard from standard VFP wizards.

Also, from what I know, when certain SQL Server settings are ON (or OFF?), blank field (all spaces) is inserted into the SQL Server as a NULL value. try to dig from this side.

Try also following in the VFP command window:

USE {table to copy} alias MyVFPTableAlias
nn = SQLStringConnect("Driver=SQL Serevr;") && select options to connect
strSQL = "INSERT INTO MyTable (field1,...{fields list}) values (?MyVFPTableAlias.Field1,?...{all other values})"
? SQLEXEC(nn,strSQL)

If error happens, use AERROR() function to get array with error messages. Then send error here if any.


>How do I move records from a VFP table in a DBC into an SQL table?? Using VFP 6 and SQL 7.
>
>I have the DBF in the DBC with the exact same fields as the SQL table.
>
>I tried to append from that DBF and it dies after one record saying that a certain field can not be blank (null) , but it is NOT blank in the DBF.
>
>I tried to scatter memvar then Insert into the SQL table (a remote view in the DBC) and it insert one record FINE, but always dies on the SECOND record it does not allow nulls (but there IS data in the DBF field for record 2).
>
>
>HELP!!!!!!!!!!
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform