Wednesday, March 21, 2012

Invalid Locator de-referenced

In our application we use three database(access, sql server and oracle) to store configurations. We use a program to copy the configuration from one database to another. We use ODBC and MFC recordsets to do the copy. We recently updated the application and changed the the table schema's. Before we had two tables which each had a schema of one long as key and one image field. Now we have one table with one long as key and three image fields. Now when we copy to sql server from access we get the error " Invalid locator de-refrenced" when we have large data (about 1 MB) in one image field. Before the change in schema's we did not have this problem with an image field with a large amout of data. We are using the sql server odbc driver.

Jim,

I believe this error message is raised as a result of writetext request to the server. Is it possible for you to try SQL Native Client ODBC driver. This is the most up to date SQL Server ODBC driver. You can download Microsoft SQL Server Native Client from http://www.microsoft.com/downloads/details.aspx?FamilyId=DF0BA5AA-B4BD-4705-AA0A-B477BA72A9CB&DisplayLang=en

Thanks

Waseem

|||

I am using the SQL server ODBC driver 2000.85.1117.00 and also got the Invalid Locator de-referenced when I copied data containing the big image and text. I used the SQLPrepare, SQLBinderParam, SQLParam and SQLPutData. The error I got likes:

SQLParamData: RETCODE= -1; State=37000, Native Error=7143

Our application is Unicode based and we used the SQL_C_WCHAR and SQL_C_BINARY in bind parameter but the sql type in the server is text and image.

Any idea?

I downloaded the SQL Native Client, it is even worse since I got an exception for un-recognized type.

Appreicate any helps

workingonsql

|||

having the same problem found a solution said "passing SQL_LEN_DATA_AT_EXEC(250000) as the
nullindicator to SQLBindParameter and then put the data in 250000 byte chunks".

but not sure what its means, do you know?

sql

No comments:

Post a Comment