ADO - blank datagrid, why?

Kirimi

New member
Joined
Jul 25, 2006
Messages
1
Programming Experience
1-3
ORACLE n VB

VB.NET:
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
'db.Open "PROVIDER=MSDASQL;driver={Oracle in DataBase};server=davie;uid=davie;pwd=pix;database=davie;"
db.Open "PROVIDER=MSDataShape;Data PROVIDER=MSDASQL;dsn=DAVIE;uid=davie;pwd=pix;database=registry;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select NO, NAME, CLASS, JOIN, LEAVE FROM DAVIE.STUD WHERE NO = '& *txtNo.text*'", 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
Next
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Question
Q: this code brings a blank datagrid, why?
 
Last edited by a moderator:
This question should be a new topic of discussion. A new posting...

I'll answer your question with two of mine.

Is there data in the table?
Why are you using classic ADO?

Using ADO.NET, you can test the datagrid during coding to see if it will work. That is, load the data correctly. I suggest you use ADO.NET. The techgnome highly recommends it!
 
is there a reason why youre using the datashape driver rather than a specific oracle driver (ole db for oracle or oracle client proper)
 
Back
Top