mrhicks
March 21st, 2001, 08:46 PM
Hello all,
I have a question, I have a form with a bunch of controls ( check boxes, text boxes etc.. ) and one ADODC control. Each of the controls on the form are binded to the ADODC in some fashion by setting its DataSource and DataField to the corresponding field in the database table. Everything seems to work fine, but when I load and run the program the ADODC control doens't seem to start with the first entry in the database table which has a Primary Key Value of 194 ( it starts at 34 ). It goes all the way to the end, but I can't figure out why it is not starting at the first Primary Key value.
Here is the connection string
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\programming\myfiles\Visual Basic\Archive Tool v0.0.1\archiveDB.mdb;Persist Security Info=false
The record source is set to 2 - adCmdTable which points to a valid table in the database. Anyone have any thoughts? Also, in the ADODC caption I want to display the current record out of the max number of records ( something like 3 of 500 ). I can't figure out how to determine which record is currently selected or the max number of records in the database. I have tried using the pRecordset from the WillMove method, but can't find anything worth while in that struture. There is a MaxRecords property, but that doesn't return the maxmium number of records in the table. Any thoughts on this subject? Thanks
private Sub Adodc1_WillMove(byval adReason as ADODB.EventReasonEnum, adStatus as ADODB.EventStatusEnum, byval pRecordset as ADODB.Recordset)
Mark Hicks
I have a question, I have a form with a bunch of controls ( check boxes, text boxes etc.. ) and one ADODC control. Each of the controls on the form are binded to the ADODC in some fashion by setting its DataSource and DataField to the corresponding field in the database table. Everything seems to work fine, but when I load and run the program the ADODC control doens't seem to start with the first entry in the database table which has a Primary Key Value of 194 ( it starts at 34 ). It goes all the way to the end, but I can't figure out why it is not starting at the first Primary Key value.
Here is the connection string
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\programming\myfiles\Visual Basic\Archive Tool v0.0.1\archiveDB.mdb;Persist Security Info=false
The record source is set to 2 - adCmdTable which points to a valid table in the database. Anyone have any thoughts? Also, in the ADODC caption I want to display the current record out of the max number of records ( something like 3 of 500 ). I can't figure out how to determine which record is currently selected or the max number of records in the database. I have tried using the pRecordset from the WillMove method, but can't find anything worth while in that struture. There is a MaxRecords property, but that doesn't return the maxmium number of records in the table. Any thoughts on this subject? Thanks
private Sub Adodc1_WillMove(byval adReason as ADODB.EventReasonEnum, adStatus as ADODB.EventStatusEnum, byval pRecordset as ADODB.Recordset)
Mark Hicks