Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Guids
Message
De
20/06/2008 07:33:38
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Re: Guids
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Database:
MS SQL Server
Divers
Thread ID:
01325529
Message ID:
01325684
Vues:
14
>I have fox tables that have ID columns of type double that I converted to C(36) and repopulated with a guid value and cascaded those values down to child tables. I do a query via OleDbAdapter to load said tables into memory in my C# app.
>
>I created a copy of said table in Sql Server and the ID column is of type uniquidentifer. When I try and move the table to the server from the dataset via a Bulk Copy - WriteToServer() call I get an error "The given value from the data source cannot be converted to type uniqueidentifier of the specified column".
>
>So I went back and made my fox columns type varbinary and casted the guid values to a type Q. Repeated the same process and got same error.
>
>What do I need to do to get the data type conversion to work? Fox has no problem with the guid and I can see them in the column with the dataset XML visualizer.
>
>Thanks all,
>
>MW

I had the same problem and ended using temporary linked server. IMHO it's a bug in .Net. It tries to use there System.Convert.ChangeType to make the conversion and fails naturally. What were they thinking when they created that class.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform