Binding of TextBoxes 
Author Message
 Binding of TextBoxes

These Are hard to answer I don't know if you want to look at an entire
recordset or returning one value.
One Value...

TxtField.Text = DataEnvironment1.Command1(4711)

for a recordset...

Dim db As Connection
  Set db = New Connection
  db.CursorLocation = adUseClient
  db.Open "PROVIDER=MSDASQL;dsn=Varec;uid=;pwd=;"

  Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select CustomerID,CompanyName Order by CompanyName", db,
adOpenStatic, adLockOptimistic

  Dim oText As TextBox
  'Bind the text boxes to the data provider
  For Each oText In Me.txtFields
    Set oText.DataSource = adoPrimaryRS



>with the DataEnvironment I created following command:
>SELECT xyz FROM testtable WHERE id = ?

>At desingtime I bound a TextBox Text1 to this command

>(Text1.DataSource = DataEnvironment1
> Text1.DataMember = Command1
> Text1.DataField = xyz)

>In sourcecode I execute the command:


>Is there an easy way to refresh the contents of then TextBox?

>I can write

>Text1.DataField = Text1.DataField

>after this statement the contents of the TextBox is correct. But when I
>more than one TextBoxes there should be an easier way.

>I use VB 6.0, ADO 2.0 and Oracle 8.0.


Sun, 04 Nov 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. binding 2 textboxes to different adodc's

2. Binding a TextBox

3. Binding a TextBox

4. Binding a textbox in run-time

5. ADOdc binding a textbox. Datafield property missing here?

6. How else can I bind a TextBox in VB5?

7. Synchronizing bound combobox and bound textboxes?

8. Bound textbox fails to bind on some machines

9. binding data to a textbox

10. data binding to a textbox control from datagrid

11. Data Bound Combo with Textboxes

12. Textbox bound to datetime field


Powered by phpBB® Forum Software