|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
i have one datagrid and one adodc controler and i need to connect the adodc controler at run time with separate tables(record sources) by clicking one button it will show one table details by clicking another button it will show another table details
but When you click any button first time it will connect and show corresponding record.But for the second it wont display the new Record sources i also tryed by using rebind but something is missing please tel what to do this is the code under the two buttons ....it isnt working!!! any idea what to do??? //code under commnad button 1 Private Sub Command1_Click() Adodc1.ConnectionString = "dsn=jay" Adodc1.RecordSource = "table1" Set DataGrid1.DataSource = Adodc1 End Sub // code under command button 2 Private Sub Command2_Click() 'DataGrid1.ClearFields 'DataGrid1.ReBind Adodc1.ConnectionString = "dsn=jay" Adodc1.RecordSource = "table2" Set DataGrid1.DataSource = Adodc1 End Sub |
|
#2
|
|||
|
|||
|
Did you try adodc1.refresh? Or how about using a 2nd adodc?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
tanx
Yeah it worked with refresh
tahnx dough |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > How to change datagrid at Runtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|