Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp Com InterOp Passing SQL_VarBinary Value
Message
 
 
À
13/11/2007 12:30:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01268674
Message ID:
01268676
Vues:
16
To get binary data back as Varbinary/Blob issue once before any SQLEXEC()
CURSORSETPROP("MapBinary", .T., 0)
See MapBinary in the CURSORSETPROP() Function help for details.


>When I query my Sql Server table -- the column's data type is data type Sql_VarBinary -- Vfp is converting the value to string implicitly. I need to pass the Sql_VarBinary value to a .Net Com Server as a C# byte array.
>
>I've tried just using the implicitly-converted string in the result set, converting it using CreateBinary(), and passing that, but the COM object: it returns the string 'System.byte[*]' which isn't valid.
>
>The value on the VarBinary field is actually a string that has been encrypted. Converting it to string and then back to varBinary corrupts the value! I need to simply pass a pristine SQL_VarBinary value from the Sql Server column to the C# object as a byte array.
>
>I've also tried using a remove view: DBSetProp (..., "Field", "DataType", "G") ... since DBSetProp doesn't support datatype "Q".
>
>Any ideas, short of writing a custom C# wrapper class, please?
>
>Thanks--
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform