Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INSERT with OPENQUERY to Foxpro Tables
Message
From
03/08/2000 11:58:58
 
 
To
02/08/2000 08:01:25
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
00399776
Message ID:
00400419
Views:
16
I notice that the code does not specify that the date field could except null values in step 1. When the insert is done in step 4 the date value is not specified.

>When using OPENQUERY with INSERT in SQL 7 statements, I get the following error message:
>
>Server: Msg 7399, Level 16, State 1, Line 1
>OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error.
>
>The following steps show how to recreate the situation and error:
>
>1. First create a table on the SQL box in Foxpro.
>create table d:\temp\testdb;
> (id c (7),;
> cdescript c (20),;
> dated d)
>
>2. Then add a linked server to SQL to access this.
>sp_addlinkedserver
> @server = 'VFP DATA',
> @srvproduct = 'MSDASQL',
> @provider = 'MSDASQL',
> @provstr = 'Driver={Microsoft Visual FoxPro Driver};UID=;PWD=;SourceDB=d:\temp\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;'
>
>3. check the connection is working.
>select * from openquery([VFP DATA], 'SELECT * FROM TestDB')
>
>4. attempt to insert a record into the table.
>insert into openquery([VFP DATA], 'SELECT id, cdescript FROM TestDB')
> (id,cdescript)
> values ('1','hello world')
>
>Executing this step gives the following error.
>
>Server: Msg 7399, Level 16, State 1, Line 1
>OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error.
>
>If using UPDATE or DELETE this doesn't occur.
>
>Has anyone managed to work around this?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform