Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC connection problem

Status
Not open for further replies.

CleoMan

Programmer
Jun 18, 2003
110
ZA
I want to create a ODBC connection and use this connection in Crystal to create certain reports that Paradox can effecinetly create.

So i set up my ODBC connection (so far so good), but when I select the table I want to use in the report i get the following error: "Invalid buffer or string lenght"

Does anyone know what this error means or how I can go about the solving the problem.

The problem is not related to crystal or my ODBC (I think), but has something to do with the fields in my table.

Any and all advice is appreciated.

Thanks
Richard
 
Richard,

Need a few querstions answered:

1) Which version of Crystal?
2) What's the table structure?
3) What ODBC driver are you using?
4) What's your version of MDAC (see to see how to check this).

I don't have the latest version of Crystal installed, but it'll help if I can duplicate your error.

-- Lance
 

1) Crystal Reports 9
2) The table is created via SQL and contains mostly alphanumeric fields, number fields and two date fields.
3)Microsoft Paradox driver
4)MDAC 2.5

Hope this is sufficient: if not please let me know what information you may still need.

Thanks
Richard


 
Hey, I figured out the problem!

It has nothing to do with the ODBC or Crystal reports!

What i realised is that when the table name is to long (for instance: "ThisIsATableWithData.db")the error is generated.

So in other words: If you get this error using ODBC the problem is the table name is to long, and if shortend will solve the problem!

Thanks anyway Lance

Richard
 
Richard,

Ah, now I see why. The Microsoft Paradox driver was originally built using the old Paradox Engine. As such, it never truly supported the newer Paradox format that Borland instroduced when they replaced the Paradox Engine with ODAPI (the first version of what became known as BDE).

The older Paradox formats didn't support long file names, so you may see hiccups in products designed for those formats, such as Microsoft's ODBC driver.

Data Direct's Paradox driver (which can be found on Corel's Paradox install CD's for 9.0 or later, such as Paradox 9 Developer Edition, WPO Professional 2002 and later, and so on) has a much better reputation and should be used instead of the Microsoft driver whenever possible.

I recently installed Crystal 8.5 on my home system and noticed that they do have a BDE connection available for Paradox tables. I would recommend using that if at all possible.

In any event, I'm glad to hear you resolved the issue. If you find you have troubles accessing tables stored in folders containing spaces, try using the "shortened" version of the directory names. For example, instead of connedcting to C:\Program Files\Whatever, try C:\PROGRA~1\WHATEVER.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top