Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 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 May 10th, 2005, 03:27 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Dwizz,

Looks like there is datatype problem with the values you are trying to pass to the ServerSpec method. What is the signature for that method? If they are expecting anything other than string, you'll need to cast the values from the dropdown lists to the appropriate types that the method expects.

-Peter
 
Old May 11th, 2005, 03:29 AM
Authorized User
 
Join Date: Apr 2005
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay, the ServerSpec method is as follows;
Function ServerSpec( _
                ByVal server As String, _
                ByVal colour As String, _
                ByVal processorSpec As String, _
                ByVal noCPU As Integer, _
                ByVal memAmount As Integer, _
                ByVal memConfig As String, _
                ByVal hDDSpec As String, _
                ByVal noHDD As Integer, _
                ByVal rAID As Boolean, _
                ByVal rAIDType As String, _
                ByVal fDD As Boolean, _
                ByVal opticalDrive As Boolean, _
                ByVal opDriveType As String, _
                ByVal tapeDAT As String, _
                ByVal tapeDATType As String, _
                ByVal notes As String) As Integer

and on button click event, as follows;
Sub Button1_Click(sender As Object, e As EventArgs)
    ServerSpec( _
                DropDownList1.SelectedItem.Value, _
                servercolour.SelectedItem.Value, _
                DropDownList2.SelectedItem.Value, _
                DropDownList3.SelectedItem.Value, _
                MemAmt.SelectedItem.Value, _
                MemCfig.SelectedItem.Value, _
                DropDownList5.SelectedItem.Value, _
                DropDownList6.SelectedItem.Value, _
                CheckBox1.Checked, _
                raid.SelectedItem.Value, _
                FDD.SelectedItem.Value, _
                CheckBox2.Checked, _
                CDType.SelectedItem.Value, _
                DropDownList4.SelectedItem.Value, _
                DropDownList15.SelectedItem.Value, _
                Additional.Text)
                msgbox("Quote Saved Successfully, QuoteID = ")
End Sub


 
Old May 11th, 2005, 08:37 AM
Authorized User
 
Join Date: Apr 2005
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I managed to solve it, thanks everyone for helping me, I just changed Boolean to String and the checkboxes to dropdownlists (took the easy way out).

But once again thanks to evrybody who helpped me.

D






Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to Database Scripts82 ASP.NET 1.0 and 1.1 Professional 8 September 15th, 2006 07:47 AM
Trouble writing database MDrumm Classic ASP Databases 5 August 4th, 2005 03:27 PM
Writing data to database cdenequolo Classic ASP Databases 2 August 17th, 2004 08:00 PM
writing to a database charliejamesuk MySQL 1 March 25th, 2004 11:10 AM
Writing to an external database scottiegirl MySQL 4 March 2nd, 2004 04:02 PM





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