Many many years ago I developed a VB6 program accessing an Access db running on Windows XP. I am now trying to convert the application to run on Windows 10.
Have had partial success but now really stuck and wondering if anyone could help.
What I have done so far is:
- changed the program so that any references to the access database point to the location where I will place it on the Windows 10 desktop.
- copied executable and Access database from XP desktop to Windows 10 desktop. Obviously gave an error on execution.
- had to register 2 ocx files: mscomct2.ocx, msadodc.ocx
- application now runs with no runtime errors but the main form, which accesses the access database, does not display any data from the database (the fields are empty but no error displayed)
The main form uses an ADODC object, Adodc1, on the form to specify the database properties
CommandString: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Trevor\Labels\Label.mdb;Persist Security Info=False
RecordSource: SELECT * FROM address ORDER BY recno
I assume the syntax of the CommandString is OK as I select the access database in other subroutines using the same definition assigned to a string with no problems.
It is just the form itself, where the text boxes DataSource property are assigned to Adodc1, are not filled in with the database data when the main form loads.
It's as though the SQL Select command is not being activated.
Is there anything else I need to do? It's just frustrating as the VB6 program works just fine under Windows XP.
Any suggestions would be greatly appreciated.
An update to my question above.
I edited the main form (this in fact is the only form) and deleted all code and form fields associated with the functions you can perform.
What is left are just labels, the textboxes associated with the database fields plus the Adodc1 property.
Still the same problem, no access database data is displayed when I run the program. That is the textboxes are not being populated.
Tried same program in Windows XP pointing to database on that machine and it works fine. The 1st record is displayed.
I also display the number of records in the database which is correct.
My conclusion is there is something strange with the Windows 10 environment. Any known faults or other suggestions would be appreciated.
Have had partial success but now really stuck and wondering if anyone could help.
What I have done so far is:
- changed the program so that any references to the access database point to the location where I will place it on the Windows 10 desktop.
- copied executable and Access database from XP desktop to Windows 10 desktop. Obviously gave an error on execution.
- had to register 2 ocx files: mscomct2.ocx, msadodc.ocx
- application now runs with no runtime errors but the main form, which accesses the access database, does not display any data from the database (the fields are empty but no error displayed)
The main form uses an ADODC object, Adodc1, on the form to specify the database properties
CommandString: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Trevor\Labels\Label.mdb;Persist Security Info=False
RecordSource: SELECT * FROM address ORDER BY recno
I assume the syntax of the CommandString is OK as I select the access database in other subroutines using the same definition assigned to a string with no problems.
It is just the form itself, where the text boxes DataSource property are assigned to Adodc1, are not filled in with the database data when the main form loads.
It's as though the SQL Select command is not being activated.
Is there anything else I need to do? It's just frustrating as the VB6 program works just fine under Windows XP.
Any suggestions would be greatly appreciated.
An update to my question above.
I edited the main form (this in fact is the only form) and deleted all code and form fields associated with the functions you can perform.
What is left are just labels, the textboxes associated with the database fields plus the Adodc1 property.
Still the same problem, no access database data is displayed when I run the program. That is the textboxes are not being populated.
Tried same program in Windows XP pointing to database on that machine and it works fine. The 1st record is displayed.
I also display the number of records in the database which is correct.
My conclusion is there is something strange with the Windows 10 environment. Any known faults or other suggestions would be appreciated.