ODBC connection to MS Access fails to update

This is a discussion on ODBC connection to MS Access fails to update within the PHP General forums, part of the PHP Programming Forums category; Ok, I've been researching this for about an hour. Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-28-2005
Chad Lupkes
 
Posts: n/a
Default ODBC connection to MS Access fails to update

Ok, I've been researching this for about an hour.

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation
must use an updateable query., SQL state S1000 in SQLExecDirect

I've checked that Microsoft page for Article ID : 175168, and checked
all of my settings. The file is not set to read-only. It has to be my
code. I'm not that familiar with SQL, so I'm probably doing this
wrong:

$Update = "UPDATE internaltest SET LastContact = now()
WHERE Email = '$mail_to'";
$result = odbc_do($connectionstring, $Update);
if(!odbc_num_rows($result)) echo "Date Update Successful";
else echo "Date Update Failed";

This comes after sending an email to an opt-in mailing list that I
currently have in MS Access. The script sends the emails just fine,
but I ran up against the time limit during my first attempt. Now I
want to select only those records where the LastContact field is
earlier than 11/27/05.

Any help would be wonderful.

Reply With Quote
  #2 (permalink)  
Old 11-29-2005
Jan Willem
 
Posts: n/a
Default Re: ODBC connection to MS Access fails to update

you should set your permissions to MODIFY or FULL. Write is not enough.


"Chad Lupkes" <chadlupkes@gmail.com> wrote in message
news:1133149227.937574.222980@g44g2000cwa.googlegr oups.com...
> Ok, I've been researching this for about an hour.
>
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation
> must use an updateable query., SQL state S1000 in SQLExecDirect
>
> I've checked that Microsoft page for Article ID : 175168, and checked
> all of my settings. The file is not set to read-only. It has to be my
> code. I'm not that familiar with SQL, so I'm probably doing this
> wrong:
>
> $Update = "UPDATE internaltest SET LastContact = now()
> WHERE Email = '$mail_to'";
> $result = odbc_do($connectionstring, $Update);
> if(!odbc_num_rows($result)) echo "Date Update Successful";
> else echo "Date Update Failed";
>
> This comes after sending an email to an opt-in mailing list that I
> currently have in MS Access. The script sends the emails just fine,
> but I ran up against the time limit during my first attempt. Now I
> want to select only those records where the LastContact field is
> earlier than 11/27/05.
>
> Any help would be wonderful.
>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:06 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0