Problem with "image" data type

Problem with "image" data type

Post by Tracer Ton » Thu, 21 Mar 2002 18:25:54


Hello

I have a type conversion problem. Or maybe it's a COM problem.
I want to copy a table from MS SQL Server over to a MS Access table.
Everything is going just fine, until I now encounter
a field in the SQLServer table with data type "image". I'm working in C++
and ADO, but answers from VB programmers are welcome.

I work like this:

AccessTable->AddNew();
GetADOField(AccessTable, "A1")->Value =
DoubleVal(GetADOField(SQLServerTable, "A1")); // This works fine
GetADOField(AccessTable, "Category")->Value =
LongVal(GetADOField(SQLServerTable, "Category")); // This works fine
.
.
AccessTable->Update();

But how to make it for the image? There must be more choices (other than
"LongVal", "DoubleVal"...) that applies to an image, but I can't find it
anywhere.
I saw the AppendChunk function, is this the way to go? In that case, how do
I use it?

In MS Access the corresponding data type for the "image" is "ActiveX data
object". I think it's correct.

Thankful for any help!

Best Regards / Per

 
 
 

1. Problem with "image" data type

Hello

I have a type conversion problem. Or maybe it's a COM problem.
I want to copy a table from MS SQL Server over to a MS Access table.
Everything is going just fine, until I now encounter
a field in the SQLServer table with data type "image". I'm working in C++
and ADO, but answers from VB programmers are welcome.

I work like this:

AccessTable->AddNew();
GetADOField(AccessTable, "A1")->Value =
DoubleVal(GetADOField(SQLServerTable, "A1")); // This works fine
GetADOField(AccessTable, "Category")->Value =
LongVal(GetADOField(SQLServerTable, "Category")); // This works fine
.
.
AccessTable->Update();

But how to make it for the image? There must be more choices (other than
"LongVal", "DoubleVal"...) that applies to an image, but I can't find it
anywhere.
I saw the AppendChunk function, is this the way to go? In that case, how do
I use it?

In MS Access the corresponding data type for the "image" is "ActiveX data
object". I think it's correct.

Thankful for any help!

Best Regards / Per

2. ODBC SQLProcedureColumns() returning no rows

3. installing sql server 2000 on windows xp pro

4. Comparing Columns of type "Image"

5. 16-table Limit in SQL Queries

6. Type "Image" in SQl Server 7

7. "Image Data"

8. insert images in a field "image"

9. Getting "Image" Data into SQL Server

10. max of ("...","...","..")

11. sql server 7 data type "BIT"