Filenames (and paths) in Database Text Fields

monkeyboy
11-27-2000, 02:21 PM
Hey there! I have an app that uses a common dialog to get a filename (along with the complete path). I store this in a memo field in an Access DB and a text field in a SQL Server DB. Using ADO, I just change the ODBC DSN and can move back and forth between databases (which is very cool).

I can store the filename in both databases. No problem. I can retrieve it from Access with no problem. When I retrieve it from SQL Server, some of the fields come across (using the recordset.fields(xx) in the debug window, I can check the numeric fields just fine. The file name gets an "Overflow" error (error code 6). I look in the database (with SQL Enterprise Manager) and everything is hunky-dory. I try to access it and get this error.

All of the rest of my database accesses work fabulous no matter which db I'm using.

I am using VB5 and ADO 2.1. Any ideas? Thanks!

PWNettle
12-01-2000, 08:30 AM
Could it be possible that your 'text' field in SQL server is of a fixed length string type that's excessively long? For this kind of text it'd be good to be using a field of type VarChar with a length of 128 or even less (depending on how long you think your paths might be). Just a thought.

Good luck,
Paul

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum