0

Visual Basic 6 プロジェクトの DHTML タイプを使用して、データベースとやり取りできる HTML ページを作成したいと考えています。msdn に例があります: http://msdn.microsoft.com/en-us/library/aa229040(v=vs.60).aspx この例では BindingCollection オブジェクトが使用され、私の vb6 ではそのようなオブジェクトが定義されていませんでした! コードは次のとおりです。

Dim colBind As BindingCollection

Private Sub DHTMLPage_Load()
' Create a BindingCollection object, then set its
' DataSource property to your data environment and its
' DataMember property to the Customers command object.
Set colBind = New BindingCollection
With colBind
Set .DataSource = MyDataEnvironment
.DataMember = "Customers"

' Bind the Value property of elements on the HTML page
' to fields in the Customers recordset.
.Add CustomerID, "Value", "CustomerID"
.Add CompanyName, "Value", "CompanyName"
.Add Address, "Value", "Address"
.Add City, "Value", "City"
.Add Region, "Value", "Region"
.Add PostalCode, "Value", "PostalCode"
.Add Country, "Value", "Country"
End With

End Sub
4

1 に答える 1