Solved

ODBC Visual Foxpro Linking

Posted on 2003-11-16
4
898 Views
Last Modified: 2008-02-01
I am trying to link data from an access database an i am having difficulties.  I have created an ODBC visual foxpro link to the database, but when i try to copy the data from an excell spreadsheet to the database, i get the following error

ODBC--update on a linked table 'patient' failed
[microsoft][odbc visual foxpro driver] SQL: statement too long. (#812)

In plain english, what is it telling me and how do i correct it?
 
0
Comment
Question by:CalMedMike
4 Comments
 
LVL 1

Accepted Solution

by:
erici earned 250 total points
ID: 9760056
I can only speculate on the exact problem, but I would guess that this is probably happening because the data you are trying to insert into the table doesn't match up with the fields in the table.  Also verify that you have update permissions to the data in the db by opening one of the linked tables and changing some of the data manually.

If that works, create a query on the table that you're attempting to insert into selecting all the fields from your excel spreadsheet in the same order as your excel spreadsheet.  Open that query and select the NEW row at the end of the query.
Then in Excel, copy all the cells from the spreadsheet (making sure to only select the cells you need to paste into the db.)  And go back into the Query results and paste.

I've used that technique many times to insert data.  You just need to make sure that the shape of the data is identical on both sides.  

You also need to make sure you're inserting valid data.  If the foxpro db is setup with autonumber/identity primary key fields (which hopefully it is) you probably should avoid entering these values in the db directly as that can cause problems too.

Good luck!
0
 
LVL 9

Expert Comment

by:ornicar
ID: 10063934
----------------------------------------------------------------------------------------
This question has been abandoned and needs to be finalized.
 You can accept an answer, split the points, or get a refund (information at http:/help.jsp#hs5)
  If you need a moderator to help you, post a question at Community Support (http:/Community_Support/)

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

ornicar
Cleanup Volunteer

---------------------------------------------------------------------------------------------
0
 
LVL 39

Expert Comment

by:stevbe
ID: 10103259
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: erici {http:#9760056}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now