Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Guids
Message
From
20/06/2008 07:33:38
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Re: Guids
Environment versions
Environment:
C# 3.0
OS:
Vista
Database:
MS SQL Server
Miscellaneous
Thread ID:
01325529
Message ID:
01325684
Views:
13
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform