Click here to Skip to main content
15,922,407 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how can you open an internet explorer browser? Pin
jedskie_a15-Feb-05 18:10
jedskie_a15-Feb-05 18:10 
GeneralRe: how can you open an internet explorer browser? Pin
rwestgraham16-Feb-05 12:32
rwestgraham16-Feb-05 12:32 
GeneralRe: how can you open an internet explorer browser? Pin
rwestgraham15-Feb-05 12:41
rwestgraham15-Feb-05 12:41 
GeneralScripting Resource File Development Pin
SQL2kGuy14-Feb-05 9:42
SQL2kGuy14-Feb-05 9:42 
Generalnull field into Listview Pin
Jaydeanster14-Feb-05 8:24
Jaydeanster14-Feb-05 8:24 
GeneralChanging Backcolor of Tabcontrol Pin
OneBad34714-Feb-05 8:15
OneBad34714-Feb-05 8:15 
GeneralRe: Changing Backcolor of Tabcontrol Pin
Dave Kreskowiak15-Feb-05 3:53
mveDave Kreskowiak15-Feb-05 3:53 
GeneralCannot create a child list for field property Pin
Jaydeanster14-Feb-05 7:51
Jaydeanster14-Feb-05 7:51 
Hello all,

Two part question:

A. What am I doing wrong with the code below to generate the error on the Subject line above?
B. Is binding the best option (such as the one I have below) of displaying a specific record on a form?

//////////////////////
Private sqlConn As SqlConnection
Private SqlDataAdapter1 As SqlDataAdapter
Private sqlCmd As SqlCommand
Private DataSet11 As DataSet

Private Sub frmPropertyDetailTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim pintProperty As Short
Dim pbndtemp As Binding

sqlConn = New SqlConnection("Server=server;Database=db;User ID=us;Password=pw;Trusted_Connection=False")

sqlCmd = New SqlCommand
sqlCmd.Connection = sqlConn
sqlCmd.CommandType = CommandType.Text
sqlCmd.CommandText = "SELECT dbo.property.* FROM dbo.property"

sqlConn.Open()

SqlDataAdapter1 = New SqlDataAdapter
SqlDataAdapter1.SelectCommand = sqlCmd

DataSet11 = New DataSet

pintProperty = Me.SqlDataAdapter1.Fill(DataSet11)

pbndtemp = New Binding("Text", DataSet11, "property.PropertyID")
Me.txtPropertyID.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.PropertyName")
Me.txtPropertyName.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Address1")
Me.txtAddress1.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Address2")
Me.txtAddress2.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.City")
Me.txtCity.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.State")
Me.txtState.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Postal")
Me.txtZip.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Country")
Me.txtCountry.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Business")
Me.txtBusinessNumber.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Fax")
Me.txtFaxNumber.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Support")
Me.txtSupportNumber.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Email")
Me.txtHotelEmail.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Url")
Me.txtWebsite.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Status")
Me.txtStatus.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Product1")
Me.txtProduct1.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Product2")
Me.txtProduct2.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Product3")
Me.txtProduct3.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Product4")
Me.txtProduct4.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Product5")
Me.txtProduct5.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Rooms")
Me.txtTotalRooms.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.LiveDate")
Me.txtLiveDate.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.HIBDate")
Me.txtHIBDate.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.RevCategory")
Me.txtRevCat.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.UtellSelection")
Me.txtUtellSelection.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.Inventory")
Me.txtInventory.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.JoinFee")
Me.txtJoinFee.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.DevOwner")
Me.txtDevOwner.DataBindings.Add(pbndtemp)

pbndtemp = New Binding("Text", DataSet11, "property.SDMgr")
Me.txtSdMgr.DataBindings.Add(pbndtemp)

sqlConn.Close()

End Sub
///////////////////////

Thanks a bunch,

jaydeanster


I could have been a contender; I could have been somebody...
GeneralRe: Cannot create a child list for field property Pin
Virus Detecter14-Feb-05 20:01
Virus Detecter14-Feb-05 20:01 
GeneralRe: Cannot create a child list for field property Pin
Anonymous15-Feb-05 5:46
Anonymous15-Feb-05 5:46 
QuestionHow To Send Images Over a Network Pin
saber_sri14-Feb-05 7:23
saber_sri14-Feb-05 7:23 
AnswerRe: How To Send Images Over a Network Pin
Virus Detecter14-Feb-05 20:12
Virus Detecter14-Feb-05 20:12 
GeneralRe: How To Send Images Over a Network Pin
Gavin Jeffrey15-Feb-05 4:55
Gavin Jeffrey15-Feb-05 4:55 
GeneralRe: How To Send Images Over a Network Pin
Virus Detecter15-Feb-05 20:01
Virus Detecter15-Feb-05 20:01 
Generalproblem in vcd cutter software Pin
mm_chanakaya14-Feb-05 6:55
mm_chanakaya14-Feb-05 6:55 
GeneralRe: problem in vcd cutter software Pin
Dave Kreskowiak14-Feb-05 7:09
mveDave Kreskowiak14-Feb-05 7:09 
GeneralRe: problem in vcd cutter software Pin
mm_chanakaya14-Feb-05 7:54
mm_chanakaya14-Feb-05 7:54 
Generallittle problem with strings Pin
Stephan Wright14-Feb-05 6:39
Stephan Wright14-Feb-05 6:39 
GeneralRe: little problem with strings Pin
rwestgraham14-Feb-05 12:05
rwestgraham14-Feb-05 12:05 
GeneralRe: little problem with strings Pin
Stephan Wright14-Feb-05 21:08
Stephan Wright14-Feb-05 21:08 
GeneralRe: little problem with strings Pin
rwestgraham15-Feb-05 13:02
rwestgraham15-Feb-05 13:02 
GeneralRe: little problem with strings Pin
Stephan Wright15-Feb-05 21:04
Stephan Wright15-Feb-05 21:04 
GeneralRe: little problem with strings Pin
Stephan Wright15-Feb-05 21:51
Stephan Wright15-Feb-05 21:51 
GeneralVb . net 2003 mod function Pin
Anonymous14-Feb-05 6:19
Anonymous14-Feb-05 6:19 
GeneralRe: Vb . net 2003 mod function Pin
Dave Kreskowiak14-Feb-05 7:05
mveDave Kreskowiak14-Feb-05 7:05 

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.