Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Reading "Image" datatype using an Access application

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-04-17 : 07:43:38
Robert writes "I am having a problem reading an image data type in a SQL Server 2000 table with Access 97. The history of this problem goes like this:
I DTS an Access table with an OLE Object field into SQL Server 2000. I then linked the Access application to the converted SQL Server 2000 table. The data type started it's life in Access as an OLE Object data type. It was coverted to an Image data type in SQL Server and now Access tells me that "the ODBC call failed" when I try to open the table in Access. Note: the Access application can read the other fields in the SQL Server table if I delete the Image column. Is there a solution to this problem?

Thanks
Bob Ruemer
rruemer@parpharm.com"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-04-17 : 07:47:00
I think the problem is that MS Access stores some descriptive information in it's OLE object fields, but SQL Server does not...it just stores the binary data. Access probably can't determine what type of object is stored in SQL Server and throws an error.

You could try changing the SQL Server database so that it doesn't import that data into an image column (just drop that column from the SQL Server table) You can then split the Access table into two, and put the primary key column and the OLE object column in a separate table. That way the objects stay in Access, you can move the other columns to SQL Server, and then join the two in Access when you need them. You'd need to have some application logic to check for newly inserted or deleted rows in SQL Server and Access.

Go to Top of Page
   

- Advertisement -