Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2007, 02:25 AM
Authorized User
 
Join Date: Jun 2005
Posts: 32
Thanks: 0
Thanked 1 Time in 1 Post
Default dataset merging and try catch

I am new bee in vb 2005.
My probelm is i fail to merge the dataset and the error from the merging is catch in the try catch but the messagebos does not prompt out as coded.My coding is as follow:

[Code
Private mdsAdditionalPJS As New DataSet()
Private mdsPaperCode As New DataSet()


Try
If txtJobNo.Text <> "" And e.KeyChar = Chr(13) Then
cmd = New MySqlCommand("SELECT * FROM prodjof WHERE ProdJobNo=?ProdJobNo ", conn)
cmd.Parameters.Add("?ProdJobNo", MySqlDbType.VarChar) 'Access the id datafield
cmd.Parameters("?ProdJobNo").Value = txtJobNo.Text.Trim
da.SelectCommand = cmd
da.Fill(mdsAdditionalPJS)
a = mdsAdditionalPJS.Tables(0).Rows.Count
mdsPaperCode.merge(mdsAdditionalPJS)
End If

Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
[/Code]


Does anyone has idea on this?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Try...Catch lowell VB.NET 3 July 23rd, 2007 06:35 AM
Dataset merging and saving to database Talarin3 ADO.NET 8 April 19th, 2006 11:30 AM
Try and Catch? mujju PHP How-To 2 January 20th, 2005 12:27 PM
Merging dataset. sanjay_gupta ADO.NET 2 December 30th, 2003 01:56 PM
Catch Problem dag VB.NET 2002/2003 Basics 1 December 8th, 2003 09:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.