English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i need to access the database stored in MS Access and need to connect it with php...

can anyone provide me the connection string etc for a DSN less conection?
Eg.
to connect VB->Access directly, i have the code and i want an equivalent for php->Access

Dim rs1 As New ADODB.Recordset

Dim sql1 As String
sql1 = "SELECT ename FROM exercises AS e1 WHERE e1.eid in (select eid from preventedby where aid in( select aid from ailment where aname like '" & Combo1.Text & "' ))"
rs1.Open sql1, cnglobal, adOpenDynamic, adLockPessimistic

Do While Not rs1.EOF
'Label6.AddItem rs.Fields("ename")
Label7.Caption = rs1.Fields("ename")
rs1.MoveNext
Loop
rs1.Close
Set rs1 = Nothing

2006-12-26 19:03:42 · 2 answers · asked by ravi s 1 in Computers & Internet Programming & Design

2 answers

You need to define your Access database as an ODBC source and use ODBC functions in PHP:

http://www.php.net/ODBC

You will use odbc_connect() to connect to the database, odbc_exec() to execute queries, and odbc_fetch_*() to fetch the results.

PHPfreaks has a tutorial on using PHP with Access:

http://www.phpfreaks.com/print.php?cmd=tutorial&tut_id=61

__________

2006-12-27 03:31:46 · answer #1 · answered by NC 7 · 0 0

you could have the skill to export the advice to a comma delimited record. there's a module for oscommerce that could then import the advice right into a mysql database. you incredibly DONT choose for to apply get right of entry to as a cyber web database this is in simple terms no longer quickly adequate for that style of use. examine the OS commercer boards, there is advice on importing archives.

2016-10-06 01:44:36 · answer #2 · answered by fritch 4 · 0 0

fedest.com, questions and answers