Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create image file from Text field
Message
From
10/09/2014 10:23:36
 
 
To
10/09/2014 10:18:26
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01607213
Message ID:
01607307
Views:
24
>>>When running the query it says "Type blob is not a defined system type".
>>>When casting to VarBinary(max) it says "Explicit conversion from data type text to varbinary(max) is not allowed."
>>
>>
>>OK, I thought you were selecting from a vfp table
>>
>>try
>>
>>declare @test table
>>
>>  ( field1 text );
>>
>>insert into @test values('1234');
>>
>>select cast(cast(field1 as varchar(max)) as varbinary(max))
>> from @test;
>>
>
>Great, thanks a lot. I almost gave up!

Seems like you have to convert text to varchar before converting to varbinary
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform