473,395 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Linq.Binary vs. LinqDatasource vs. ListView

I have a simple LiveView control that databinds to a LinqDataSource that maps
to a table like this:

CREATE TABLE MyTable
(Id int NOT NULL,
Name nvarchar(50) NULL,
Picture image NULL)

The OR mapper class (made in the VS 2008 designer) has a property of type
System.Data.Linq.Binary

When editing (and clicking update) a row in the listview i get this error:

"Failed to set one or more properties on type MyTable. Ensure that the
input values are valid and can be converted to the corresponding property
types. "

Inspecting inner execptions i see:

"Cannot convert value of parameter 'Picture' from 'System.String' to
'System.Data.Linq.Binary'."

Looking more into the ListViewUpdateEventArgs on the protected void
ListView1_ItemUpdating(object sender, ListViewUpdateEventArgs e) method i
notice:

Picture
e.NewValues["Picture"] {"AAAAAAAA=="} object{System.Data.Linq.Binary}
e.OldValues["Picture"] "\"AAAAAAAA==\"" object {string}

Can you make this work?

Dec 12 '07 #1
0 2113

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: shapper | last post by:
Hello, I have been using VS2005 and ASP.NET 2.0 since their appearance. I am now creating a Web Site and a Class Library in VS2008. In both cases I want to create a database with tables and...
2
by: shapper | last post by:
Hello, I have two tables: TagId, PostId TagId, PostId How can I delete, given a TagId, the record from Tags and all records associated with it in PostTags.
6
by: =?Utf-8?B?TmVkaW0=?= | last post by:
I am starting a new web application and I was planning on using linq but i have a bunch of problems. most forms will display some data from the database, but there always has to be a filtering...
4
by: CSharper | last post by:
I would like know, will it be possible to run a linq statement generated on the fly by a program? Lets say, I have string like the following string t = "from c in doc.Decentents('Value') select...
0
by: Marius Manolea | last post by:
Hi, I have a strange problem, I don't receive any modifications from listview in edit mode (OldValues & NewValues are empty) <asp:ListView ID="lvEditPersonRoles" runat="server"...
0
by: Lloyd Sheen | last post by:
I was in a thread talking about how to populate a listview from a Linq query. This got my curiosity up so I created a usercontrol which is a listview which can be populated from a Linq query. I...
2
by: CSharpcoder | last post by:
Can anyone recommend any good books on learning LINQ?
0
by: =?Utf-8?B?UmF5bmFsZA==?= | last post by:
Hi everybody, I have a problem on linq related field, look my simple example : <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.