473,383 Members | 1,980 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,383 software developers and data experts.

Anyone know what this means? (Updating DataGridView)

Hi all,

Here's the code I'm using:

Dim sqlCnn As New SqlConnection(cnn)
Dim sqlCmd As New SqlCommand("Update AMS.dbo.Call_Log Set
Status = @status, UPSTrack = @ups where TicketNumberActual =
@ticketnumber", sqlCnn)
sqlCmd.Parameters.AddWithValue("@ticketnumber",
SqlDbType.BigInt.ToString())
sqlCmd.Parameters(0).Value =
dgConsumables.Columns("TicketNumberActual")
sqlCmd.Parameters.Add("@status", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(1).Value = dgConsumables.Columns("Status")
sqlCmd.Parameters.Add("@ups", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(2).Value = dgConsumables.Columns("UPSTrack")
sqlCnn.Open()
sqlCmd.ExecuteNonQuery()
sqlCnn.Close()

And I'm getting this error:

No mapping exists from object type
System.Windows.Forms.DataGridViewTextBoxColumn to a known managed
provider native type.

I think it has to do with not specifying the cell's value, but that's
just a guess.

Any idea what that means?

Thanks!

Jun 5 '07 #1
3 2421
Looch,

Which line is causing the problem? Can you provide a stack trace?

Go to the web.config and set TraceLevel to 4. Using the debug output
viewer and capture the trace output while reproing the problem and that will
spell out exactly what is going on.

Hope this helps,
Steve

"Looch" <lu**********@yahoo.comwrote in message
news:11*********************@m36g2000hse.googlegro ups.com...
Hi all,

Here's the code I'm using:

Dim sqlCnn As New SqlConnection(cnn)
Dim sqlCmd As New SqlCommand("Update AMS.dbo.Call_Log Set
Status = @status, UPSTrack = @ups where TicketNumberActual =
@ticketnumber", sqlCnn)
sqlCmd.Parameters.AddWithValue("@ticketnumber",
SqlDbType.BigInt.ToString())
sqlCmd.Parameters(0).Value =
dgConsumables.Columns("TicketNumberActual")
sqlCmd.Parameters.Add("@status", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(1).Value = dgConsumables.Columns("Status")
sqlCmd.Parameters.Add("@ups", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(2).Value = dgConsumables.Columns("UPSTrack")
sqlCnn.Open()
sqlCmd.ExecuteNonQuery()
sqlCnn.Close()

And I'm getting this error:

No mapping exists from object type
System.Windows.Forms.DataGridViewTextBoxColumn to a known managed
provider native type.

I think it has to do with not specifying the cell's value, but that's
just a guess.

Any idea what that means?

Thanks!

Jun 5 '07 #2
On Jun 5, 5:40 pm, "PlatinumBay" <stevan...@community.nospamwrote:
Looch,

Which line is causing the problem? Can you provide a stack trace?

Go to the web.config and set TraceLevel to 4. Using the debug output
viewer and capture the trace output while reproing the problem and that will
spell out exactly what is going on.

Hope this helps,

Steve

"Looch" <lucianoj2...@yahoo.comwrote in message

news:11*********************@m36g2000hse.googlegro ups.com...
Hi all,
Here's the code I'm using:
Dim sqlCnn As New SqlConnection(cnn)
Dim sqlCmd As New SqlCommand("Update AMS.dbo.Call_Log Set
Status = @status, UPSTrack = @ups where TicketNumberActual =
@ticketnumber", sqlCnn)
sqlCmd.Parameters.AddWithValue("@ticketnumber",
SqlDbType.BigInt.ToString())
sqlCmd.Parameters(0).Value =
dgConsumables.Columns("TicketNumberActual")
sqlCmd.Parameters.Add("@status", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(1).Value = dgConsumables.Columns("Status")
sqlCmd.Parameters.Add("@ups", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(2).Value = dgConsumables.Columns("UPSTrack")
sqlCnn.Open()
sqlCmd.ExecuteNonQuery()
sqlCnn.Close()
And I'm getting this error:
No mapping exists from object type
System.Windows.Forms.DataGridViewTextBoxColumn to a known managed
provider native type.
I think it has to do with not specifying the cell's value, but that's
just a guess.
Any idea what that means?
Thanks!- Hide quoted text -

- Show quoted text -

This is a straight vb app, no web.config (unless I'm seriously missing
something, in which I'm shutting off my pc for good :D). The
ExecuteNonQuery line is throwing the error.

Jun 5 '07 #3
Looch,

It is strange, however I always set the connection property with a command.
http://msdn2.microsoft.com/en-us/lib...onnection.aspx

Cor
"Looch" <lu**********@yahoo.comschreef in bericht
news:11*********************@m36g2000hse.googlegro ups.com...
Hi all,

Here's the code I'm using:

Dim sqlCnn As New SqlConnection(cnn)
Dim sqlCmd As New SqlCommand("Update AMS.dbo.Call_Log Set
Status = @status, UPSTrack = @ups where TicketNumberActual =
@ticketnumber", sqlCnn)
sqlCmd.Parameters.AddWithValue("@ticketnumber",
SqlDbType.BigInt.ToString())
sqlCmd.Parameters(0).Value =
dgConsumables.Columns("TicketNumberActual")
sqlCmd.Parameters.Add("@status", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(1).Value = dgConsumables.Columns("Status")
sqlCmd.Parameters.Add("@ups", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(2).Value = dgConsumables.Columns("UPSTrack")
sqlCnn.Open()
sqlCmd.ExecuteNonQuery()
sqlCnn.Close()

And I'm getting this error:

No mapping exists from object type
System.Windows.Forms.DataGridViewTextBoxColumn to a known managed
provider native type.

I think it has to do with not specifying the cell's value, but that's
just a guess.

Any idea what that means?

Thanks!

Jun 6 '07 #4

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

Similar topics

6
by: Christian Seberino | last post by:
I am looking at the ELSE home page and trying to figure out if I should invest the time to learn about the ELSE minor mode for Emacs. Is there any programmer out there using ELSE that is getting...
1
by: Rob | last post by:
Dear All, I have a class that exposes a few properties. These properties are used in a DataGridView. The code for that is shown bellow. The problem is that I also need to show...
10
by: michael sorens | last post by:
Is it possible to store an unbound DataGridView component into a setting? I naively tried defining a Setting that is a DataGridView called DGV, then simply assigning it:...
3
by: Rich | last post by:
Hello, If I want to update data displayed in a datagrideview/datagridview cell, how can I determine what cell I am updating? I am looking at the click event below, for example. Can I get...
8
by: Brian Pelton | last post by:
This is on .Net 2.0 in a WinForms application. I have a DataGridView that is bound to a BindingSource. The DataGridView has 3 columns. The first two are "normal" text columns and the last is a...
2
by: Spam Catcher | last post by:
Hi All, I want to bind a datagridview or ListView to a List that is constantly being updated (items are added/removed all the time). Any ideas what the best way is to do this? I tried binding...
2
by: hjin | last post by:
DataGridView takes very much time if I update a lot of data I have a DataGridView which has a DataSource (a DataTable) of 3000 rows. If I want to update one column of every rows in the DataTable,...
0
by: deathprincess | last post by:
Hi Guyz, Need some help in updating my data grid view. I used the Rows removed and selection changed events. i have a code on the selection changed events and it worked well but the code on...
5
by: Bill Schanks | last post by:
I have a winform app (VB 2005) that allows users to export data to excel, make updates to the excel file and import the data from that Excel file and update the database. My question is: Is it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.