-
Nov 7th, 2000, 07:57 PM
#1
Thread Starter
New Member
I'm using the following code below to try and bind a
a TrueGrid to a recordset object. I know the recordset is being set correctly on the adodc, cause I queried it in the
Immediate windows and was getting what I had expected.
However I'm struggling to bind the grid to the datacontrol
Basically I'm seeing no records in the grid, when I have 1 record in my recordset.
I'm coming from the world of DAO, so excuse for ineptitude in this! (Note I have not set any properties on the adodc and truegrid at design time)
ANY IDEAS?
Dim objConn As New ADODB.Connection
Dim objRs As New ADODB.Recordset
objConn.Open "DSN=System42;UID=JMP;PWD=JMP"
If objConn.State = adStateOpen Then
objRs.Open "Select * from User_T", objConn, adOpenForwardOnly, adLockReadOnly
Adodc1.ConnectionString = objRs.ActiveConnection
Set Adodc1.Recordset = objRs
Set TDBGrid1.DataSource = Adodc1
TDBGrid1.ReBind
TDBGrid1.Refresh
End If
Set objConn = Nothing
Set objRs = Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|