Solved

ODBC Visual Foxpro Linking

Posted on 2003-11-16
4
901 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

863 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

24 Experts available now in Live!

Get 1:1 Help Now