Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




PHP And Microsoft Access


Is it possible to use php to interface with an ms access database?

Our current database (customers, suppliers etc) is in ms access format and we need to run msaccess. I dont feel like converting the whole database over to mysql and we still need the original system, the idea will be that the staff can access the database on the road thru a webpage.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
SQL Error: [Microsoft][ODBC Microsoft Access Driver] Too Few Parameters
I'm trying to execute the following SQL statement and get the following error.

SELECT DomainNames.DomainName FROM DomainNames WHERE DomainNames.DomainName Like "*ab*" ORDER BY DomainNames.DomainName

SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect

I'm running PHP4, Apache 1.3.12 (Win32) and connecting to an Access database on a Win2K box.

Odbc_exec(): SQL Error: [Microsoft][ODBC Microsoft Access Driver]
i am trying to write to the database through odbc. i get the following error:

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in c:inetpubwwwroot514VIP_SurveyProcess.php on line 41

my directory has read/write permissions why am i getting this? here is the code as an example:
...
$x = 10;
$querySet = "UPDATE Survey SET $rdoOption = $x";
odbc_exec($objConn, $querySet);
...

Exporting To Microsoft Access
I have a PHP website with a mySQL database and a client wants to be able to see the database on his computer using Microsoft Access.

I would like to be able to make a special backdoor section for him, where he enters his username and password and is given a link which will make take a snapshot of the mySQL database and convert it to a Microsoft Access database which he can download to his computer.

Is this possible?

Since he isn't very computer savvy I need a way as user friendly as possible to let him download the database and view on his local computer.

Microsoft Access -> PhpMyAdmin
Alright, so what’s going on is that I have coded an entire website with in mind to have an Access Database. So everything works great...

But now I am faced with the problem that I have to have my webpage work with phpMyAdmin, which works completely differently in running my sql statements and everything, ie: ->EOF, select statement, etc...

Is there a way for me to have a smooth transition for my code to work with phpMyAdmin instead of Access at the moment, because recoding all of this means an enormous amount of work with not much free time left on my hands. Code:

Microsoft Access Dropdown List
l am building a new site using PHP which has a lot of pages pulling from an Access Database. I would like to have a dropdown list that pulls exhibitions from the database and then when the user selects one it shows the rest of the details from DB just below the dropdown list, hope that makes sense. Code:

Insert Into Microsoft Access Table Using ODBC
The following lines of code don't return an error but they also do not insert the row into the database:

$SQLText="Insert into member (MailingID, MemberID, [File As], EMail, LetterID, AudienceID, DateSent, Sent) Select $MailingCode, $row[0], '".$row[5]."', '".$row[6]."', $LIDToInsert, $AIDToInsert, '".$DateSent."', 1;";

print '<br>'.$SQLText;

$rs_upd=odbc_exec($link, $SQLText);

if (!$rs_upd) die("Couldn't update database");

I've tested the resulting $SQLText string in Access directly and it works find there so this must be a PHP or ODBC issue.

Inserting A Date Into A Microsoft Access 97 Database
I was wondering if anyone could help me insert a short date into microsoft access 97 using php? i can insert text no problem but i can't seem to be able to insert a date properly. i have been using

//$date = "#" . "$sqlmonth" . "1" . "$cboyear" . "#";

$strSQL = "INSERT INTO tblSupport (tDate) VALUES ($date)";
$result = odbc_exec($connect, $strSQL);

Note: i can insert a date if i hard code it like putting in #01

PHP On Microsoft-IIS/6.0
Is it possible to make IIS parse .html files the same way as Apache does
with AddType application/x-httpd-php .html in .htaccess?

Microsoft SQL Connection
I am looking to have a php page that will have a required include of a
config file with the MS SQL connection creation. I want to have a form
that saves into a MS SQL database. Could call out to a stored
procedure or have inline code in the php page.

Anyone have examples or generic sample code I can use?

PHP With Microsoft Sharepoint ?
I would like to ask if I can synchronize Sharepoint Services with my PHP
website?

Hint: I think it can be done by XML as a bridge.. but I am not sure and
wanna be sure.

PHP And Microsoft Word
I have users who can sent a Word document as an attachment to an email
from a Microsoft-rich environment. I would like to be able to
"capture" that attachment as a blob and deposit it into a mysql
database. I am not sure how to do the capture.

PHP To Microsoft Outlook
Is it possible to send meeting notifications to microsoft outlook through php? I guess it would be sort of an e-mail sent to an individual telling them they have been invited to attend an event and the event info is automatically added to thier outlook calender or something?

Microsoft Exchange Server
Do any of you know a free PHP script that does the same stuff as Microsoft
Exchange Server?

Microsoft SAPI Problem With PHP
As I've found tons of VB and C# sample codes, I was trying to transform

it into PHP code, using the COM objects. My aim is to create a simple
html, that creates a wav from a text. Here's what I've tried -the php
script part-:

$Voice = new COM("SAPI.SpVoice");//works
//com_load_typelib("SAPI.SpVoice"); //This doesn't help...
$Voice->Speak("Hello!"); //works

$FileStream = new COM("SAPI.SpFileStream"); //works - I mean no error
$FileMode = SpeechStreamFileMode.SSFMCreateForWrite;// = 3 //works -
no error
$FileStream->Open("c:a.wav", 3, false); //works - no error
$Voice->AllowAudioOutputFormatChangesOnNextSet = false; //works - no
error
$Voice->AudioOutputStream = $FileStream; //HERE'S THE PROBLEM

$Voice->Speak("Hello world",1);
$FileStream->Close();

Here's the error I get for that line:
Uncaught exception 'com_exception' with message 'Error [0x80020003]
Member not found

PHP Wrapper For Microsoft SAPI
I can not figure out the reason why this does not go past step 2, it will not go to 2a. Code:

Microsoft Word Formatter
Anyone know of some sort of php script that can read and format Microsoft word documents?

PHP / Microsoft SQL V7/2000 - Page Results
Anyone know a simple way to page results of a SQL Select using Microsoft SQL ? I don't believe they have anything as handy as MySQL LIMIT.

Parse Error For Microsoft.XMLHTTP
I want the following ASP code to be rewritten in PHP:

<%
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://www.mydomain.com", False
xml.Send
Response.Write(xml.responseText)
%>

I tried myself with ASP2PHP conversion tool. The following code was generated. But does not work. I get a parse error. Please help!

<?PHP
$xml->Open "GET" "http://www.mydomain.com" $False;
$xml->Send;
echo $xml->responseText;
?>

How To Embed Microsoft Word In A Page Using Php
how to embed or open microsoft word file in a page using php script

Any Ideas How To Run Macro In Microsoft Publisher Through PHP COM ?
my macro in Publisher changes "123" into "321" (example)
but I can't be able to run it.
This is how far I get throught with PHP & Publisher:

<?
$pub = new COM('publisher.application') or die('Unable to load
Publisher');
print "Loaded Publisher, version {$word->Version}
";

$pub->Open('xxx.pub');

$pub->Documents[1]->SaveAs('xxx2.pub');

$pub = null;

?>

this works, but of course does not do anything else than open xxx.pub
and save it as xxx2.pub. I am trying to run my macro:

$pub->Documents[1]->RunMacro(replaceme);

where replaceme is my macro. I tried different variations:

$pub->Documents[1]->Run(replaceme);
$pub->Documents[1]->Application->Run(replaceme),

etc but no luck so far :(

Reading Microsoft Office Documents?
I need to be able to upload a Microsoft office document and then show the contents to the visitor, in addition i need to be able to  write documents on the fly.

Is there a way of doing this, or will i have to spend days researching and programming my own classes to handle it?

PHP Will Not Read More Than 4096 From My Microsoft Sql Text Field.
I have a textarea that is saving to a mssql text (very large) field. The insert, update is working fine. However, when php reads the data using mssql_result function, I'm getting limited to 4096 characters read by php. I know that there are at least 6000 characters and I can see them using microsoft's query analyzer. This is not a magic quotes, single quote, quote, html entity or anthing like that. PHP will not read more than 4096 from my microsoft sql text field. Any ideas how I can get php to read more?

Microsoft JET Database Engine Error '80040e10'
I am new to ASP, I am trying to create a page using ASP that will read from a database and write to my page, but I get this error every time: Microsoft JET Database Engine error ?e10' No value given for one or more required parameters.

Microsoft And Zend Announce Collaboration To Enhance PHP On IIS
Microsoft's Product Unit Manager for Internet Information Services
(IIS), announced a new collaboration with Zend to improve
performance and stability of PHP on Windows.
This isn't just vaporware, either. During Andi Gutmans' keynote
(Andi is one of the creators of PHP and co-founder of Zend), Bill
announced the availability of a technical preview release of FastCGI
for IIS and demoed it for the audience as well.
FastCGI is a new component for Microsoft's Web server platform that
is available for download & evaluation today. It works IIS 6.0 in
Windows 2003 Server and IIS 5.1 in Windows XP. Even cooler, it also
works with the brand new IIS 7.0 making its debut with Windows Vista
and, later, as part of Windows Server code-named "Longhorn."
This announcement continues to solidfy IIS as the premiere Web
application server whether you are developing sites with ASP.NET or
any other server framework. Moreover, regardless of the programming
language or framework they choose, developers building sites of any
size can leverage the full capabilities of the Microsoft platform
with enterprise-class security, speed and stability.

Warning: SQL Error: [Microsoft][ODBC Driver Manager]
Cannot get an ODBC (or MSSQL) connection to MS Sql Server 7. Using a system datasource and it connects fine, but PHP does not like it. I've had no problem with NT4 but Win2K is another story...

Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in c:inetpubwwwrootindex.php on line 8

Can I Convert MySQL Db Records Into Microsoft Word Documents?
i found the solution to export
file from mysql db into *.csv. but is there anyway to convert the
contents into *.doc and save in my webserver and providing a link for
the end users to download the word file?

FYI, the database records are obtained by end users submitting the
forms themselve and i saved it in my db...

PHP Equivalent For Server.CreateObject("Microsoft.XMLHTTP") In ASP
I'm new to PHP, so I'm trying to figure out how to do things that I used to do in ASP.

One of those things is getting data from another web page, server-side.

In ASP, I'd do this:

Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.open "GET", strURL, False
objXML.send()

I could then use regexp to pull out data from objXML.responseText.

How can I do the same thing in PHP?

How Do I Access /tmp ?
I'm on a shared server and use sessions for security. How can I check the /tmp directory to see if other users can read my session files?

/temp doesn't show up in FTP. I'm obviously clueless about server architecture. Sorry for the lame question.

PHP And MS Access
I'm just trying to find out what would be the script I would have to use to connect to an access DB with PHP?

PHP & MS Access?
I'm asked to connect an existing Access DB to a site with PHP. There are some programs that work around that DB (CRM etc...), so if I upload the whole bunch to our hosting server, we are no longer able to access the db off-line from within these programs, right? So what might be the solution? Migrating to MySQL, converting the DB and doing everything on-line (I prefer working with MySQL, but what about the other programs then?), or doing everything off-line like we used to and uploading it the whole time (daily, so not very preferable). Or...?

What do you think? Forget Access, go MySQL? Off-line / on-line?

Access DB
I was wondering as a new programmer to PHP if MY SQL is the only DB that PHP will work with, the reason I am asking is I am use to using access DB's when I was programming with iHTML and ASP.

PHP & MS Access
I wasn't sure if this belonged in General Databases or PHP, but I'm putting it here in hopes that some PHP guru's will have a little experience with this.

I'm building a site for a new client and they already have a host and domain configured.

The plan was to use PHP/MySQL for the entire site, except their host doesn't support MySQL on their Windows servers. (It's a Windows 2003 server BTW).

The only DB support they have on my client's current plan is Access, FoxPro and DBase. I have extensive experience with Access but not for web applications. One thing I do know is that Access is far from speedy.

Which brings me to my question -- do you think I should move ahead with Access and PHP, or try to transition over to a Unix server and get MySQL? They already have three domains on this host, all of their email, etc. It's a small business and they can't afford to give up their email for long.

Whil I think Access would suffice for the time being, how much traffic do you think a PHP/Access site could handle and also do you think it would be a smooth transition to move the Access DB to SQL Server if/when the traffic demands the change?

SQL Server requires additional money so it's not a reasonable option at this point without a great reason.

MS Access
I have a database in MS Access; is there any way to use the database
in a PHP script?

Allow Access From Just One IP
Do I need PHP in order to allow access to one certain file from just ONE IP? Or is it possible to solve this with a .htaccess file?

PHP And Access
I know PHP can work with MySQL, but does it work with MS Access?

Php/DB Access
Ho un db in Access da mettere in rete. Sono riuscita a fare il
collegamento e a interrogare il DB, sembra funzionare tutto
perfettamente tranne per un importantissimo particolare...non riesco a
visualizzare le immagini. Queste sono in formato jpg e sono state
inserite nel DB tramite collegamento ipertestuale.
Qualcuno riesce a darmi una mano?

Access, Php, Ado
I need to learn how to connect to an access database using ADO with PHP. ODBC is not an option. I anyone could point me to some tutorials, or give me some example code that would be great.

PHP And Access
I have an access database which I used to demonstrate Java - ODBC
connectivity and it works fine.

I tried to access the same DSN (system DSN) thro' PHP and the
following error is displayed.

Warning: odbc_connect() [function.odbc-connect]: SQL error:
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified, SQL state IM002 in SQLConnect in
D:AjithTeachingPHPExamplesphpdbmstest.php on line 8
Connection Failed:

Database is there, DSN is defined, can access the DSN via Java but not
with PHP.

PHP + MS Access
I want to know if PHP can connect to a MS Access 2002 Database? If it is possible what is the script to connect PHP to MS Access?

PHP And MS Access + XML
I have resords in an access database. I want to retrieve them using php
and generate an xml file with them. I can retrieve the records and
generate an xml file but the xml file contains no data.
This is the code im using:
PHP:

$query1="SELECT * FROM cust";
$result=odbc_exec($conn , $query1)or die("Query failed: $sql<br
/>Error: ".mysql_error()."<br />");

$xml = ''
$xml .= '<?xml version="1.0"?>'."
";
$xml .= '<!DOCTYPE customer SYSTEM "customer.dtd">'."
";
$xml .= '<shop>'."
";

while($row = odbc_fetch_row($result))
{

$xml .= '<customer>'."
";
$xml .= '<customerId>'.$row['custonerId'].'</customerId>'."
";
$xml .= '<name>'.$row['name'].'</name>'."
";
///$xml .= '<address>'."
";
$xml .= '<addressline1>'.$row['address1'].'</addressline1>'."
";
$xml .= '<addressline2>'.$row['address2'].'</addressline2>'."
";
$xml .= '<addressline3>'.$row['address3'].'</addressline3>'."
";
///$xml .= '</address>'."
";
$xml .= '<phone>'.$row['phone'].'</phone>'."
";

$xml .= '</customer>'."
";

}
$xml .= '</shop>'."
";
$xmlfile = "C:phpdevwwwjimcustomers.xml";
$myfile = fopen($xmlfile,"w+");
fwrite($myfile,$xml);
fclose($myfile);

odbc_close($conn);

and this is the XML it generates

<?xml version="1.0" ?>
<!DOCTYPE customer (View Source for full doctype...)>
- <shop>
- <customer>
<customerId />
<name />
<addressline1 />
<addressline2 />
<addressline3 />
<phone />
</customer>



PHP To MS Access?
i'd like to know if PHP can be used to connect to MS Access? and if it can be used, is it the same way to connect to MY SQL?

Log In Access
i needed a login page for my website, so i found a code on gooogle, http://www.devshed.com/c/a/PHP/Creating-a-Secure-PHP-Login-Script/ that is what i found, i know i am probably using this rong but can some one tell me how to put it all together.

No Access To Php.ini
I have script which requires some of the php.ini settings to be modified.

eg error reporting etc.

I dont have direct access to the php.ini file on the production server

I know I can override the .ini settings using

<? ini_set("error_reporting", "some value"); ?>

So what value can I use in my script to replicate the setting below?


My .ini file on my testing machine has

error_reporting = E_ALL & ~E_NOTICE; display all errors, except notices

Access And PHP3?
Is it possible to use a MS Access database with php3?
If "yes" any help how to begin?

Root Access
If I want to add a column in a existing table in a php script, do I have to have root access?

MySQL Vs MS Access
Thats right, I did say MS Access...

Excuse me for not putting this in its proper MySQL forum, but I have seen some great debates recently transpire regarding technology choices, and I am in desperate need of expert opinions!

My employer was recently bought out by another web development co. that unfortunately (for me) they specialize in ASP development... The funny thing is they don't even utilize MS SQL Server, they use MS Access. At first, I was astounded... Did they know something that I did not... Even Microsoft themselves have put huge warning signs all over their MSDN regarding Access's use over the internet...

I was scared to even suggest this to the managers, for fear that they knew some way of avoiding the fact that Access does not possess the power that MySQL or SQL Server (for that matter -at least) do!

In fact, I was dead wrong... They didn't know a thing! I even got in a debate with the lead Access "developer(?)"... He didn't consider MySQL to be a relational database because it 'did not support cascading modifications or referential integrity'... As well as it does not have a GUI considerable to MS ACCESS... I really just wanted to laugh at him, but I instead argued the usual points regarding portability, cost, as well as its close partnering with all of the available PHP functions for MySQL.which lead to a faster more effecient development process.

I know that this message seems a bit on the immature side, but I am honestly not sure how long this company will survive if they are telling their customers to use Access (we just got contracted to do a large financial provider's website today - the managers are actually considering to advise Access!)...

Anyone that can help me bomb these clowns with success stores (MySQL) or disaster stories (Access), as well as any other info, I would greatly appreciate it.

Limit Access
I have a admin page (password protected) and many other auxialary files the admin center needs all in the same directory. Is there a way to make the auxilary files accesible to the php script but not to other users?

We Can Use/access ActiveX?
1- I have heard that we can use/access ActiveX
components in PHP. So how can i access them?

2- I want to use DataGrid/FluxGrid kind of ActiveX in
my page for displaying Records, So can i use
DataGrid/FluxGrid for this purpose?
if (yes)
{
How?
}
else
{
Why Not? and which other Availabe component can help
me like DataGrid in PHP.
}

3- What is the Strength of PHP? Means that to how much
extent we can go in it.

User Access
Can anyone help me with user access? I want to have different levels of access for users. For example; when I create accounts for users to og into my websitem, I want to be able to specify the level of access they will have. Let's say user A can access pages 1,2&3 and user B can access pages 3,4&5. I would like to have check boxes that I can check to allow them access to the specified pages!


Copyright © 2005-08 www.BigResource.com, All rights reserved