|
Hi Dave and Everyone
I had done my sqlconnection in the public area.
I am trying to insert records from DataGridView into my SQL Server database without retrieving any information and I do not require to retrieve records from database. Initally, the database in SQL Server is empty. For this program, I made use of the SqlDataAdapter, DataSet and BindingSource.
This is my latest codings as listed below:
Dim sqlcom As SqlCommand = New SqlCommand()
Dim da As New SqlDataAdapter("SELECT * FROM TBReqDG", sqlcon)
Dim myDataSet As New DataSet()
Dim cb As New SqlCommandBuilder(da)
da.InsertCommand = cb.GetInsertCommand()
da.Update(myDataSet, "TBReqDG")'ERROR COMES FROM HERE
'Open connection, execute the commands
sqlcon.Open()
sqlcom.Connection = sqlcon
'Close Connection
sqlcon.Close()
As my program runs, it show this error Update unable to find TableMapping['TBReqDG'] or DataTable 'TBReqDG'.
Is this line really necessary or I just only have to declare the sqldataadapter ?
-->Dim da As New SqlDataAdapter("SELECT * FROM TBReqDG", sqlcon)
I don't know where it had gone wrong and hope anyone who knows is able to guide me along.
Hope to receive reply soon as it’s urgent & thanks.
Rgds
Tracy
|
|
|
|
|
Hi everybody here,
I want to know ur preferences for 1 thing that I really likeee so muuch - GDI+ or Graphics in VB.Net.
- Which is best book about GDI+ in VB.Net ???
I really appreciate ur help ...
|
|
|
|
|
|
Kulazfuk this forum isn't meant for such stupid answers, please respond normal or just say nothing.
|
|
|
|
|
Zaegra wrote: this forum isn't meant for such stupid answers
Nor is it meant for such stupid questions.
|
|
|
|
|
You we're saying something about "stupid answers"... You might want to check your own before judging someone elses.
And it is rude to yell like the OP did. The font size and bold was a bit over the top.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hmmm... not wanting to start an argument here but how many of my "stupid" answers have you had to correct? None that I can recall.
No need to get personal.
|
|
|
|
|
One, as of now. I never said I needed to correct any of your answers.
Or did yout just replay to the wrong person?? Maybe you were looking to reply to Zaegra??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Oops! Sorry Dave! I got it all arse about face. Deepest apologies - I read your reply last night, thought you were having a go at me & got even more defensive.
Once again my apologies & thanks for pointing this out. Not sure if you're a drinking man but here, have a
Mental note 46 394 571 984: Read CP posts more objectively.
|
|
|
|
|
Hey .... have u get any illness,,,,
I am ask xperts not ... stupids/////
great job ...kulazfuk hahhaha LoL voilaaa
|
|
|
|
|
b3t1m0s wrote: I am ask xperts not
After posting a grand total of 3 posts, none of which are providing advice from your extensive experience, I seriously doubt you have any idea of what an expert is.
idiot alert...
|
|
|
|
|
|
The "best book" is going to be the one that is appropriate for your skill level. If you already have a decent background in GDI+ and VB.NET, then a beginner's book isn't going to be the "best". The opposite is also true. If you have no experience in GDI+, then an advanced book is going to be way over your head.
The point is you are the only one who can say which book is the best for you! All we can do is make some suggestions. You're still going to have to do the research to pick what's "best".
Amazon results for GDI+[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir,
How can i hide a column in the datagrid .
Please help
Thanks
|
|
|
|
|
DataGridName.Columns.Remove("Coulmn Name which u want to remove")
Vikash Yadav
|
|
|
|
|
Sir,
Thanks or the reply
I wanted the answer in .net version and that i have mentioned .
actually the datagrid1.columns class does not exist in .net.
please help.
Thanks
|
|
|
|
|
i also using vs.net 2005 in this it is working.& it is in datagridview class. just scroll down u will find it.
Vikash Yadav
|
|
|
|
|
Set the column mapping type hidden as below:
ds.Tables("yourTableName").Columns("columnYouWantToHide").ColumnMapping = MappingType.Hidden
|
|
|
|
|
This guy asks about 5 questions every week...seems to be homework questions.
|
|
|
|
|
I have one treeview on my form. now when user check one node of tree view this node added in my datagrid with one single datatable created at run time. now when user add child node of same parent i want to add same child in the child row of same datatable and in the gridview as child row. So how can i do that?
TC
|
|
|
|
|
I can't follow this at all...
I'm guessing at what you want here... Datatable rows don't get children. You have to design your table so that each record has a field that points to a parent records primary key in the same table.
RecordID bigint
Name nvarchar(50)
ParentID bigint
Each record has it's own unique RecordId. If a record has a parent, you set its ParentID to the RecordID number of the parent.
RecordID Name ParentID
------------------------------------
1 Mike 0 (0 means "no parent")
2 John 1 (John is a child of Mike)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi, I have an MDI form and has a child form. I want to write the command close all child form but I forget the code. As I remember I used to write in the similar code:
Dim Variable as Control<br />
<br />
For Each Control...<br />
Close all form...<br />
Next
I forget it and want to write its again when I click log off. I forget the code and if someone expereince to do the following behavior please send me this sample code. (I use vb.net 2003).
|
|
|
|
|
Easily done if you look at the MdiChildren property of your parent form.
For Each f As Form In Me.MdiChildren
f.Close()
Next
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave, thank you very much for your help. This code is really help to me accomplish my work. Thank you
|
|
|
|
|
I need help on grabbing images from 4 analog color cameras connected to BNC ports of a DVR card (PCI).
How can I get the images to picture boxes in a VB6 program?
I do not require to record video or do motion detection. All I need is to grab still images in bmp or jpeg format on an user input. My problem is as simple as that!
I could not find any windows driver for this hardware but works only with supplied DVR software.
Thanks in advancce for your help!
Dilhara
|
|
|
|