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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database array is read as a picture field

Status
Not open for further replies.

jvolden

IS-IT--Management
Jan 26, 2005
77
US
I have an array field in the SQL database I am using. In crystal when I attempt to use this field is is read as a picture field. Is there a fix for this?
Thank you.
 
I've never heard of a ARRAY type of field, however there are binary types which allow for arrays.

Please use proper technical terms, and please clarify that SQL database means SQL Server, a SQL database would mena a database which supports the SQL language, which is most.

In general please supply:

Crystal version
Database/connectivity type
Example data
Expected output

You can right click the field in Crystal and select Browse data to get it's data type.

I would guess that the developers have stored an array within a binary field. When geekzzz decide to be clever, they generally aren't ;)

-k
 
I was told it was an array field: it's contained within an array called labor in probsummary, it should be the third value in the array. It's laid out as follows:
labor {labor.date,operator,hours.worked,li.contract.id, labor.gl.number}

We are using Crystal Reports 11 and the data is on a SQL Server I am connected to using a ODBC(RDO)connection. The data base guy stated he thinks Crystal is reading it as a binary large object or a blob file.

What I am attempting to do is pull the third value (hours.worked) from this "array" field. the majority of the time if I am tolde it is an "array" field it displays in Crystal as a memo data type, this field is displaying picture for the data type.
Thank you
 
Ask the dba what the datatype is in the table.

I would suggest that they expose the data within a View to resolve this concern.

What I believe they are doing is saving data within a binary as an array, which probably seems clever for some reason, however you're discovering that it doesn't lend itself to other tools.

You might also try using a SQL Expression to CAST or CONVERT the data into a more usable format. Check with the dba on the syntax for doing so.

Here's the listing of data types for SQL Server:


-k
 
What version of SQL Server are you using? Arrays *might* be supported in the next version (which isn't slated for release for some time). Unless you're using a beta version, it isn't an array. It's likely stored as an IMAGE data type, in which case, Crystal won't be able to read it. There are SQL Server functions that can read that type of data, but I've only used them sparingly.

Perhaps you or "the database guy" can read more about how to get data out of IMAGE, TEXT and NTEXT datatypes in the SQL Server help files (aka SQL Server Books Online). If you look under the Contents tab, the path is:
Accessing and Changing Relational Data
Advanced Query Concepts
Managing ntext, text, or image

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top