473,785 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Anyone know what this means? (Updating DataGridView)

Hi all,

Here's the code I'm using:

Dim sqlCnn As New SqlConnection(c nn)
Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
Status = @status, UPSTrack = @ups where TicketNumberAct ual =
@ticketnumber", sqlCnn)
sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
SqlDbType.BigIn t.ToString())
sqlCmd.Paramete rs(0).Value =
dgConsumables.C olumns("TicketN umberActual")
sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
sqlCnn.Open()
sqlCmd.ExecuteN onQuery()
sqlCnn.Close()

And I'm getting this error:

No mapping exists from object type
System.Windows. Forms.DataGridV iewTextBoxColum n 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 2439
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**********@y ahoo.comwrote in message
news:11******** *************@m 36g2000hse.goog legroups.com...
Hi all,

Here's the code I'm using:

Dim sqlCnn As New SqlConnection(c nn)
Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
Status = @status, UPSTrack = @ups where TicketNumberAct ual =
@ticketnumber", sqlCnn)
sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
SqlDbType.BigIn t.ToString())
sqlCmd.Paramete rs(0).Value =
dgConsumables.C olumns("TicketN umberActual")
sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
sqlCnn.Open()
sqlCmd.ExecuteN onQuery()
sqlCnn.Close()

And I'm getting this error:

No mapping exists from object type
System.Windows. Forms.DataGridV iewTextBoxColum n 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, "PlatinumBa y" <stevan...@comm unity.nospamwro te:
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...@y ahoo.comwrote in message

news:11******** *************@m 36g2000hse.goog legroups.com...
Hi all,
Here's the code I'm using:
Dim sqlCnn As New SqlConnection(c nn)
Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
Status = @status, UPSTrack = @ups where TicketNumberAct ual =
@ticketnumber", sqlCnn)
sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
SqlDbType.BigIn t.ToString())
sqlCmd.Paramete rs(0).Value =
dgConsumables.C olumns("TicketN umberActual")
sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
sqlCnn.Open()
sqlCmd.ExecuteN onQuery()
sqlCnn.Close()
And I'm getting this error:
No mapping exists from object type
System.Windows. Forms.DataGridV iewTextBoxColum n 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**********@y ahoo.comschreef in bericht
news:11******** *************@m 36g2000hse.goog legroups.com...
Hi all,

Here's the code I'm using:

Dim sqlCnn As New SqlConnection(c nn)
Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
Status = @status, UPSTrack = @ups where TicketNumberAct ual =
@ticketnumber", sqlCnn)
sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
SqlDbType.BigIn t.ToString())
sqlCmd.Paramete rs(0).Value =
dgConsumables.C olumns("TicketN umberActual")
sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
sqlCnn.Open()
sqlCmd.ExecuteN onQuery()
sqlCnn.Close()

And I'm getting this error:

No mapping exists from object type
System.Windows. Forms.DataGridV iewTextBoxColum n 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
1860
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 great benefit from it? What does ELSE minor-mode for Emacs do that is so great for you? Chris
1
2177
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 data/columns/properties in the DataGridView that are not known at compile time. The total number of these data/columns/properties is also not known. So the question is how can I dynamically add properties (indexers don't seem to work) so that DataGridView can show...
10
7799
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: Properties.Settings.Default.DGV = myDataGridView; After I closed the program, the user.config file shows an empty value, so apparently that is not the way to do it.
3
14579
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 information from the sender object or the EventArgs? How? Private Sub DataGridView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.Click Console.WriteLine("row number of cell is ?")
8
11533
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 combo box column. Data binding is working fine for the first two columns. I am able to edit values and persist them back to the bound object and ultimately back to the database.
2
2093
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 the collection directly to the grid but occasionally I'll get cross thread errors (different threads updating the collection). Is there a way to get a live view of an array/list easily?
2
11623
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, my whole appliation freezes with any response. After a lot of time, it comes back. If I set the DataSource to null before changing the data and set it back after changing. There' s no problem. But I lost the status of the DataGridView, like...
0
973
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 RowsRemoved only clears the datagridview, it does not update its contents. Here's the code: int n = featureDataGridView1.SelectedRows.Index; if (feature.Parameter.Count != 0) { ...
5
2914
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 best to do it this way, calling the update stored procedure for every update? Or should I be loading this data into a staging table, and if all goes well do the 'Real' Update. Or put this into a data adapter and update from that? The application...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10152
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8974
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.