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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-09-24 : 07:57:00
|
| kathy writes "OS: Windows 2000 ProfessionalSQL: MSDE 2000, version 8.00.760, service pack 3Can sql_variant data type be used to store the data with VARIANT data type that is array? My SQL statement called from VC++ program is always failed (HR=0x80004005 "Unspecified error) when write a VARIANT with type of VT_ARRAY|VT_R8 into SQL server but successful with other non-array variant data type such as VT_R8, VT_I4 and so on.If I have to use SQL image data type to store array of data, is there VC++ sample code I can refer to? Or any suggestion about data type that can be used to store array of data?thanksKathy" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-09-24 : 07:59:05
|
| Arrays are not supported by SQL Server, but you can simulate them using comma-separated values (CSVs). These links describe a number of ways to use them:http://www.sqlteam.com/SearchResults.asp?SearchTerms=csvYou should not use the image datatype to pass that data as it is a binary type. Use varchar(8000) instead, and perform any necessary data conversions in the stored procedure. |
 |
|
|
|
|
|