Odbc_exec(): SQL Error: [Microsoft][ODBC Microsoft Access Driver]

Aug 30, 2003

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);


SQL Error: [Microsoft][ODBC Microsoft Access Driver] Too Few Parameters

Jul 3, 2000

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.

View 1 Replies View Related

Warning: Odbc_connect() [function.odbc-connect]: SQL Error: [Microsoft][ODBC Driver Manager] Data Source Name Not Found

Jul 17, 2005

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.

View 2 Replies View Related

Error Connecting To Server. Server Says: [Microsoft][ODBC Driver Manager] Data Source Name Not Found And No Default Driver Specified

Feb 7, 2006

Here's my odbc connection. PHP Code:

$db_link = odbc_connect($dsn, $username, $password)
or die('Error connecting to server. Server says: '.htmlspecialchars(odbc_errormsg()));

Error connecting to server. Server says: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

View 7 Replies View Related

Using Microsoft Excel Via An ODBC Driver?

Feb 17, 2011

I am trying to insert data and select data from Excel using an ODBC connection. I have managed to connect to it:

$dbh = new PDO("odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};Dbq=$file_name", $username, $password);

However, I am unsure how to query Excel as there is minimal documentation for this! I attempted this:

$query = "INSERT INTO $sheet ($cell) VALUES ($value)";
$result = $dbh->query($query);

But this leads to an error:

Array ( [0] => 07002 [1] => -3010 [2]=> [Microsoft][ODBC Excel Driver] The Microsoft Office Access database engine could not find the object 'Sheet1'. Make sure the object exists and that you spell its name and the path name correctly. (SQLExecute[-3010] at extpdo_odbcodbc_stmt.c:254) [3] => 07002 )

By object, hopefully they mean an excel sheet?

View 2 Replies View Related

Microsoft Access Database Through Odbc?

Feb 15, 2009

Im making a website in php with a microsoft access database through odbc and i have come across a small problem let me show you my codes first.

<form method ="POST" action="maxtimestamplog.php">
Longitude <input type="text" name="longitude" /><br/>

where $td is the least within $tssd is less than 10800.It should only display one. my sql statement is quite messy as it is i make blunder out of it.

View 1 Replies View Related

Insert Into Microsoft Access Table Using ODBC

Oct 2, 2002

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.

View 3 Replies View Related

Sql Server - Microsoft SQL Driver Vs It's SQL Driver

Sep 3, 2010

So on my test machine, I had PHP installed with Apache, and I had the PHP SQL Driver (not the Microsoft one). So, I used mssql_connect() and such commands to deal with the database. When I shifted to another server, it has Microsoft PHP SQL Driver. Now it is crashing and showing me error of PHP_via_FastCGI error, whenever I execute the mssql_connect() and the other mssql_ php commands. Do I need to change my code to something else? If that is the case, I have hundreds of files, do I need to change in each?

View 2 Replies View Related

Sql Server - MS SQL Unix Driver - Microsoft Or FreeTDS?

Sep 10, 2010

I am running a LAMP server but now need to connect to MS SQL (client request). I have heard Microsoft has a driver, but can't verify if

if the Microsoft driver is available for Unix? If not, should I just stick with FreeTDS? This appears to be recommended by PHP, however install documentation seems lacking.

UPDATE,Just for some back story, I am running an intranet from the LAMP server but needs to connect to a datasource on an external MS SQL DB Server (Windows of course). I am running PHP5.

View 1 Replies View Related

Sql Server - Equivalent Function For Mssql_result, Under Microsoft SQL Driver ?

Sep 4, 2010

What is the equivalent function for mssql_result, under Microsoft SQL Driver for PHP (sqlsrv)? give example of using that function as well.

View 2 Replies View Related

Generate Unique Serials Such As How Microsoft Office And Microsoft Operating Systems Do

Sep 10, 2010

Throughout my days as a PHP Programmer and a beginner at C# programming I've always wondered of the best way to generate unique serials such as how Microsoft Office and Microsoft operating systems do.

Does anyone have a good guide to how to handle this, Like what are the important factors in generating the unique serial, prevent duplicates etc. small example on how to create / verify them.[URL]...

View 4 Replies View Related

PHP And Microsoft Access

Jul 12, 2001

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 2 Replies View Related

Microsoft Access

Oct 31, 2005

I wanted to find out if any of you know the odbc equivalent to mysql_query I'm using a Microsoft Access DB and need to insert values into a table ex.

mysql_query("insert into cart(cookieId, MaterialListID, qty) values('" . GetCartId() . "', $MaterialListID, $qty)");

View 3 Replies View Related

Exporting To Microsoft Access

Aug 7, 2003

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.

View 4 Replies View Related

Microsoft Access Query

Jul 7, 2005

We are trying to select a record from a Microsoft Access database and display it on a PHP page on our site.

View 1 Replies View Related

Import Data From Microsoft Access?

Oct 19, 2010

The system I'm building is attempting to read Microsoft Access DBs from a different system. I essentially need to be able to read the data, parse it, and do something with it. If I could somehow load it into an associative array, a database, or anything else, that'd be great.

Our users will have to import these files themselves, so we can't ask for preconversion into something else.

I've tried looking on SO and Google but haven't found anything close to what I'm talking about.

View 1 Replies View Related

Microsoft Access Connection Optiosn?

Dec 2, 2008

trying to read some data from a Microsoft Access database using PHP.While I can establish a connection to the database, every SQL query I try and run produces an error saying it doesn't have the appriopriate read/write access. But I know that the username and password I'm logging in with have full data user rights in the Access database. The exact error message I'm getting is:PHP Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'TestTable'., SQL state 42000 in SQLExecDirect in C:....ODBCTest.php The php code I'm using is as follows:

$dbq = "C:...MyDatabase.mdb";

View 1 Replies View Related

Microsoft Access Dropdown List

Nov 18, 2007

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:

View 10 Replies View Related

Inserting A Date Into A Microsoft Access 97 Database

Aug 1, 2001

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

View 7 Replies View Related

Inserting Records Into A Microsoft Access Database...

Jun 28, 2006

I'm still new at using PHP although thanks to these forums I'm learning quite a lot. Currently, I am trying to insert a new record into my access database.

I can display records from it but not add new ones. I know that I am to use the 'INSERT' SQL function but how would an Access Database be different from mySQL?

So far I've seen only mysql examples and havent been able to find anything on access...

View 1 Replies View Related

Script Output - Connect To Microsoft Access

Dec 20, 2009

Wrote a script. PHP to connect to Microsoft Access. Access the information. Language is Persian. When this information see the Web browser. The unknown shows. this is The problem. I did the following.

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

View 4 Replies View Related

Can PHP Access Microsoft Access Databases?

Jul 16, 2005

Can PHP access Microsoft Access databases? Are there any basic scripts, any good sites out there? I just want to extract simple data from a table and display it on a webpage...as basic as can be to start.

View 5 Replies View Related

Parse Error For Microsoft.XMLHTTP

Dec 21, 2004

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

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

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

View 1 Replies View Related

Microsoft JET Database Engine Error '80040e10'

Aug 1, 2001

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.

View 1 Replies View Related

Error 42S02 From The Microsoft Drivers For SQL Server

Aug 11, 2010

I am trying to extract some data from a SQL Sever database via PHP using the Microsoft Drivers for PHP for SQL Server. Some tables I can retrieve fine but others give the following error message:

Array ( [0] => Array ( [0] => 42S02 [SQLSTATE] => 42S02 [1] => 208 [code] => 208 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'xyz$Permanent Assignments'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'xyz$Permanent Assignments'. ) )

If I try and run the same statement from isql (SELECT * FROM [xyz$Permanent Assignments]) using the same credentials it works fine so I know that the statement is correct and the object does exist.

I have also tried with version 1 and 2 of the MS drivers. The code is below but if I try other tables it works - it's all a bit hit and miss.

$tsql = "SELECT *
FROM [".$client."$Permanent Assignments]";
print $tsql;
$stmt = sqlsrv_query( $conn, $tsql);
if ( $stmt )
echo "Statement executed.";


View 1 Replies View Related

Warning: Odbc_connect(): SQL Error: [MySQL][ODBC 3.51 Driver]Unknown

Aug 1, 2006

I'm trying to connect to an Access database via a system DNS called PromoDB which has a username of root but no password, and I am currently getting the following error: Quote:

Warning: odbc_connect(): SQL error: [MySQL][ODBC 3.51 Driver]Unknown database 'promodb',SQL state S1T00 in SQLConnect in fileMaintMaster.php

The line of code that generates this error is:

$access = odbc_connect('PromoDB','root','');

View 1 Replies View Related

Compiling From Source Using Microsoft Visual C++ 2008 Error

Dec 15, 2010

I am trying to work with id3 tags in php and im using wamp server 2.0i on my vista 32bit ultimate. I followed the steps at php's wiki page on compiling extension for windows machines.(cant post the link).

everything goes nice and smooth up until towards the end where i get an error saying fatal error c1083. could not open header zlib.h. I am running the shell as the administrator and not really sure what else there is i can do. But im really going crazy over this. I have followed instructions step by step but some how i am still getting stuck. Here is the link to the text file containing the compiling process. [URL]

View 2 Replies View Related

ODBC String Quoting In Odbc_exec

Oct 4, 2006

I'm moving a script from MySQL to MS Access (yuck). Anyway, when I do
an insert or select with an email address as a field value in
odbc_exec, ODBC barfs on me.

Is there some special quoting required for the '@' in an email?

Cause now, SELECT * FROM mytable WHERE email='me@something.com'
doesn't work.

Also, INSERT INTO mytable (uid, email, arbstring) VALUES (1,
'me@something.com', 'abc') also doesn't work.

View 1 Replies View Related

Search A "keywords" Field In A Microsoft Access Database?

Jun 24, 2011

I'm trying to search a "keywords" field in a Microsoft Access database which can contain more than one word. E.g. "Cat", "Dog", "Cat Dog" etc. All of the keywords will then be listed on a page and when clicked will display any record containing that keyword. The problem I'm having is getting only one isntance of each word displayed and cannot figure out how to do it. So with the example "Cat", "Dog", "Cat Dog", "Mouse Dog" the only listed words should be "Cat" "Dog" "Mouse".

When using the following code:

$items = odbc_exec($odbc, "SELECT keywords FROM faq WHERE visible = 'true'") or die (odbc_errormsg());
while ($detail = odbc_fetch_array($items))
$exploded = explode(" ",$detail['keywords']);
$unique = array_unique($exploded);


I've attached a word document of other examples I have tried but with no luck 

View 4 Replies View Related

Odbc - Use Of Odbc_exec With Successful Result Downloads Page Instead Of Rendering It

Feb 25, 2011

I'm using unixODBC with FreeTDS to connect to MSSQL server. If I perform an SQL command using odbc_exec that results in a valid query, instead of rendering the PHP, I get a prompt to download my php file, which if I accept ends up downloading an empty file. If I purposefully break my SQL with an improperly formatted statement, the page successfully renders and displays the error statement.

If I use the command line isql to connect to my database and run the query, I am able to get a result on the command line level.

CentOS 5.5 64bit
MSSQL 2005 SP3
unixODBC 2.3.0
FreeTDS 0.82
PHP 5.3.5

View 1 Replies View Related

Connecting To MS Access 2007 Using ODBC_CONNECT - Error In Driver?

Feb 8, 2010

I have been successful in querying a Microsoft Access 2003 database (.mdb file) and now I am trying to do the same for a Microsft Access 2007. I have tried the following:

echo 'accdb';
//2007 Microsoft Access
$connection = odbc_connect("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$mdbFilename;Persist Security Info=False;", $username, $password);
echo 'mdb';
//2000, 2003 Microsoft Access
$connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename", $username, $password);

However, for an access 2007 database I get this error:

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002in SQLConnect in E:export.php on line 38

View 1 Replies View Related

PHP On Microsoft-IIS/6.0

Jul 17, 2005

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

View 4 Replies View Related

Add An ODBC Driver To A MAMP Environment?

Oct 21, 2008

I'm working on something that was built on a PC set-up using php and an ms access database. When I port the app to my MAMP environment, I get

Fatal error: Call to undefined function odbc_connect() in /path/to/index.php on line 37

line 37 looks like this:

return odbc_connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=myfile.mdb",
"ADODB.Connection", "", "SQL_CUR_USE_ODBC");

It seems like odbc isn't compiled into the MAMP version of PHP (5). I also tried using PDO, and got similar errors.

View 1 Replies View Related

Codeigniter Using Odbc Database Driver?

Apr 27, 2010

ive run into a curious problem with codeigniter's odbc driver. im connecting from a linux machine to an MSSQL 2008 machine using FreeTDS. while i get that the num_rows function always returns -1, and that is fully a database/driver issue - for some reason when i try to create a ->result(), the whole application crashes (error 500, sometimes just a blank page), if im lucky, i get an error message informing me that the application died because it tried to allocated 2 terrabytes of memory(!).

This happens irregularly, ie: every few refreshes. sometimes it runs fine, sometimes the page returns error 500 and sometimes it gives the memory allocation error - in any case its not really something that can be reproduced with percision, and the queries are SUPER simple.

View 1 Replies View Related

PHP And Microsoft Word

Jul 17, 2005

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.

View 1 Replies View Related

Microsoft SQL Server

Dec 31, 2005

I installed on my machine Apache2, PHP 5, and Microsoft SQL Server 2005 EXPRESS Edition. The op.system is Win2000. The problem, I can't connect to the SQL server via PHP. The PHP works, the sql server works(can accept connection with MSDE Query), and uncommented the line in php.ini about mssql extension.

I tried with PHP 4.4.1 also, but still not working. After that I installed the SQL Server 2005 (not the Express version, but the 180 days trial version) on another machine, allowed remote connection, and I can connect to it via php without any problems.

View 2 Replies View Related

Microsoft SQL ORDER BY

Mar 15, 2007

I am having a problem,

I need to ORDER BY a "Reference number" field in my MS SQL DB,

The only problem is, it is a varchar as it contains ref#'s like 1a, 22b, 43c.

Obviously, with a straight ORDER BY I get a sort like 1, 10, 11a, 11b, 2, 21, etc

I tried "CAST(SUBSTRING(ref, 1, 2) AS Integer)", however the lengths of the strings are different, theirfor I will get an error, "Can't convert 8a" etc.

Any ideas on how I can sort this properly?

View 5 Replies View Related

PHP To Microsoft Outlook

Aug 2, 2007

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?

View 5 Replies View Related

Php+microsoft Sql Opinion

Apr 21, 2007

I use php with my mysql database a lot. I just had something come up where I need to access data from a microsoft sql database. Are there many problems with connecting php with a microsoft sql database? Would I be better off to use something like visual basic with asp?

View 5 Replies View Related

Microsoft Frontpage

Jul 23, 2007

Is it easy to incorporate php into a microsoft front page website. I find it extrememly easy to create beautiful looking websites with frontpage but i want to add dynamics with php to it is that possible.

View 2 Replies View Related

Microsoft Word

Sep 11, 2007

I have an interface which allows people to manage and add customers. Each customer also has a category, for example 'Builders' I need a way of being able to do a mail merge to all clients with a selected category which is initialised from the web interface. For example, at the moment I can connect to MySQL and get all customers and if I go slightly further I could create a filter to do just what I need from within word. However, I need to be able to have the user choose which category from within their browser then click a button and it automatically does this filter.

I was thinking maybe somehow I could export all users in a category to a CSV file and then have a mail merge doc setup which automatically pulled data from this each time the document was loaded - this would be OK I suppose if a word file could be opened which automatically had the desired filter.

View 1 Replies View Related

Linux ODBC Driver For Visual FoxPro?

Jan 31, 2001

Does anyone know where to find a Linux ODBC driver for Visual FoxPro databases?

View 3 Replies View Related

ODBC Connection String With Obscure Driver

Jun 2, 2010

I'm attempting to connect to a database via ODBC, and I am finding no help through Google/the internet. Our ERP uses OMNIS as a framework, which provides an ODBC driver for querying OMNIS' proprietary database outside of the program. I've created the driver and DSN, but I cannot begin manipulating data or sending queries with PHP.

The driver appears in the ODBC connection manager as "OMNIS ODBC Driver" - I've tried a multitude of connection strings, but cannot seem to get it to go. The DSN is located at C:Test.dsn. Once again, the driver appears as OMNIS ODBC Driver.

View 2 Replies View Related

ODBC To Remote Db, Where Does Driver Need To Be And Can I Drop SSL On The Connection?

Sep 10, 2010

I need to connect from a web LAMP (PHP) environment to a remote Navision installation which has ODBC drivers on the server.Does the web server need the ODBC drivers on it locally as well? Or does PHP connect to the Navision server environment with it's own local drivers?Also, can I drop SSL on this connection for security - if so which component is it dropped onto? The ODBC connection?

View 1 Replies View Related

Export To Microsoft Excel

Mar 21, 2006

I have a page in which I would like to export data from a MySQL database into an Excel spreadsheet when a link is pressed. Is that possible?

View 5 Replies View Related