Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create image file from Text field
Message
De
10/09/2014 10:23:36
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01607213
Message ID:
01607307
Vues:
25
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform