Connect Basic4PPC to MsAccess

Maki25

Member
Licensed User
Longtime User
Hello,

it is possible to connect Basic4PPC with an access DB. And if it is possible, that dll file I need.
I already used sqlite and works correctly, but now I am making an application to connect to an access store database, and cannot change it.

thanks
Oscar
 

agraham

Expert
Licensed User
Longtime User
I assume that you want this for use on a desktop. Attached is a modified desktop only version of my MSSqll library that uses OleDb objects. I'm not a database programmer and I've no idea if it will work. I've assumed that all the .NET database access follows a common model and just substituted the OleDb objects for the Sql objects so look at the help for the MSSql library. The original MSSql thread, which has a link in the first post of the library thread, might also give some guidance You will need the correct connection string which will be something like

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FileName & ";User ID=Admin;Password="

Your guess is better than mine in this regard.
 

Attachments

  • MSAccess1.0.zip
    3 KB · Views: 217

agraham

Expert
Licensed User
Longtime User
I know nothing about that library and not a lot more about database access. As I rewrote the original MSSql library that user citywest started, but left unfinished and buggy, because user georgea needed it to work properly I just took the source code for the final version of that library and changed all the sql objects to oledb objects. I hoped it might work as database access in .NET appears to have a common model implemented in very similar objects which are specialised for different ways of connecting to databases.

EDIT :- I don't reallly understand the diffeence between OBBC and OLEDB except the OLEDB is supposed to be the successor to ODBC. That library you indicated seems to need some additional .NET assemblies to connect to databases using ODBC whereas this one uses the the OLEDB functionality already present in the .NET Framework.
 
Last edited:

Maki25

Member
Licensed User
Longtime User
Thanks for the information. I want access from one device to MsAccess database. I think the link you've posted Sppeci48, is what I'm looking for. But this is only for desktop.

This is a example, work very good:

con.New1
con.Open ("Driver={Microsoft Access Driver (*.mdb)};" & "Dbq=c:\db1.mdb;")
com.New1 ("",con.Value)
reader.New1
con.BeginTransaction (com.Value )
com.CommandText ="SELECT * from Articulos "
reader.Value =com.ExecuteReader
Do While reader.ReadNextRow
If reader.GetValue (0)="1001" Then
Msgbox(reader.GetValue (1))
End If
Loop
reader.Close
con.EndTransaction



I just want to access a file. "Mdb" from an application basic4ppc for device . ¿Is possible?

thanks
Oscar
 
Last edited:
Top