Click here to Skip to main content
15,914,322 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Question"Is Nothing" not running Pin
amapumu24-Oct-06 22:25
amapumu24-Oct-06 22:25 
AnswerRe: "Is Nothing" not running Pin
Dave Kreskowiak25-Oct-06 5:16
mveDave Kreskowiak25-Oct-06 5:16 
GeneralRe: "Is Nothing" not running Pin
amapumu26-Oct-06 3:05
amapumu26-Oct-06 3:05 
GeneralRe: "Is Nothing" not running Pin
Dave Kreskowiak26-Oct-06 5:43
mveDave Kreskowiak26-Oct-06 5:43 
QuestionSaving an Image in VB.NET Pin
Zaegra24-Oct-06 21:09
Zaegra24-Oct-06 21:09 
AnswerRe: Saving an Image in VB.NET Pin
Dave Kreskowiak25-Oct-06 5:12
mveDave Kreskowiak25-Oct-06 5:12 
GeneralRe: Saving an Image in VB.NET Pin
Zaegra27-Oct-06 1:19
Zaegra27-Oct-06 1:19 
QuestionHow to insert records from DataGridView to SQL Server database Pin
VS200524-Oct-06 20:59
VS200524-Oct-06 20:59 
Hi this is Tracy here.

I'm doing a form created from Visual Studio 2005 which contain a "Add" button and a DataGridView. If the records are successfully added, it will be inserted into the SQL server database. I am trying to insert records into my SQL Server database without retrieving any information first.

But my program can't work and I don't know where it had gone wrong.

Here listed my codes when the user click on the "Add" button for the DataGridView:


'Add Button For DataGridView
Dim sqlcom As SqlCommand = New SqlCommand()
Dim mySqlDataAdapter As SqlDataAdapter
mySqlDataAdapter = New SqlDataAdapter
Dim myDataSet AsNew DataSet()
Dim mySqlcb As SqlCommandBuilder
mySqlcb = New SqlCommandBuilder(mySqlDataAdapter)
mySqlDataAdapter.InsertCommand = mySqlcb.GetInsertCommand
mySqlDataAdapter.Update("TBReqDG") 'ERROR COMES FROM HERE
'Open connection, execute the commands
sqlcon.Open()
'Close Connection
sqlcon.Close()


But there is still an error as shown below:

Error 1 Overload resolution failed because no accessible 'Update' can be called with these arguments:
'Public Function Update(dataTable As System.Data.DataTable) As Integer': Value of type 'String' cannot be converted to 'System.Data.DataTable'.
'Public Function Update(dataRows() As System.Data.DataRow) As Integer': Value of type 'String' cannot be converted to '1-dimensional array of System.Data.DataRow'.
'Public Overrides Function Update(dataSet As System.Data.DataSet) As Integer': Value of type 'String' cannot be converted to 'System.Data.DataSet'. C:\Documents and Settings\Administrator\Desktop\CCC\OfasERP_New PartII\OfasERP\frmRequisitionVoucher.vb 246 9 OfasERP


Hope to receive reply soon as it's urgent & thanks OMG | :OMG: WTF | :WTF: Laugh | :laugh:



Regards
Tracy
AnswerRe: How to insert records from DataGridView to SQL Server database Pin
Dave Kreskowiak25-Oct-06 4:48
mveDave Kreskowiak25-Oct-06 4:48 
QuestionRe: How to insert records from DataGridView Of Visual Studio 2005 to SQL Server database Pin
VS200525-Oct-06 15:59
VS200525-Oct-06 15:59 
QuestionBest book for 'Working with graphics in VB.Net' or GDI+? Pin
BetimD24-Oct-06 20:44
BetimD24-Oct-06 20:44 
AnswerRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Sexton24-Oct-06 21:32
Dave Sexton24-Oct-06 21:32 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Zaegra24-Oct-06 23:55
Zaegra24-Oct-06 23:55 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Sexton25-Oct-06 2:36
Dave Sexton25-Oct-06 2:36 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Kreskowiak25-Oct-06 3:29
mveDave Kreskowiak25-Oct-06 3:29 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Sexton25-Oct-06 6:05
Dave Sexton25-Oct-06 6:05 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Kreskowiak25-Oct-06 6:53
mveDave Kreskowiak25-Oct-06 6:53 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Sexton25-Oct-06 20:13
Dave Sexton25-Oct-06 20:13 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
BetimD24-Oct-06 23:58
BetimD24-Oct-06 23:58 
GeneralRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Sexton25-Oct-06 2:44
Dave Sexton25-Oct-06 2:44 
AnswerRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Zaegra25-Oct-06 0:00
Zaegra25-Oct-06 0:00 
AnswerRe: Best book for 'Working with graphics in VB.Net' or GDI+? Pin
Dave Kreskowiak25-Oct-06 3:33
mveDave Kreskowiak25-Oct-06 3:33 
Questionhiding the colummn in datagrid .net Pin
amaneet24-Oct-06 19:51
amaneet24-Oct-06 19:51 
AnswerRe: hiding the colummn in datagrid .net Pin
Vikash Yadav24-Oct-06 20:25
Vikash Yadav24-Oct-06 20:25 
GeneralRe: hiding the colummn in datagrid .net Pin
amaneet24-Oct-06 20:40
amaneet24-Oct-06 20:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.