[wdvltalk] strange mssql problem

2008-11-19 Thread steve miller

Hi all,

We are using php to connect to a local MS SQL database, and all seems  
to be fine.
We are connecting to several tables within the same database, and are  
able to insert, update, delete, etc.
However, there is one table that refuses to let us update, and we can  
not figure out why.


We get no errors from the script, but no records updated.
If I echo out the sql statement, connect to the database with Access  
as the same user, and copy/paste the query into Access, the update  
works.


We have looked at the table in every way we know how to look, and we  
can't find anything that would stop php from doing updates.


The table is part of a purchased application and is a very important  
one, so we are wondering if there could be some restrictions defined  
somewhere.

Any thoughts on where to look?
Any special log somewhere that might tell us why the updates aren't  
working?


Any help appreciated.
steve





 • The WDVL Discussion List from WDVL.COM • 
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
  Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

  http://www.wdvl.com  ___

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.


Re: [wdvltalk] strange mssql problem

2008-11-19 Thread Ross Clutterbuck
Steve:

I had to use SQL Server recently and I found it to be a pain with
things like this, especially when I have next-to-no experience with
it. I can't really suggest where to look to fix your issues directly,
but two things I found very useful in working out my own issues:

-- write a script in ASP (if you can) that performs the same
operations on this table as you're trying to do in PHP to see if
there's any problem interfacing with this table over web techs (for
some reason I did)
-- if you don't already have it, try accessing the SQL Server using
SQL Server Management Studio (tis free from MSDN) and have a play.
There's some nice tools in there to check connections, permissions and
such, plus you can run queries directly through the GUI and get
feedback. I think there's also extensive logging you can access too so
that might show up weirdness if things don't behave the way you'd
expect.

Sorry I can't help much more than that!

MOU

2008/11/19 steve miller [EMAIL PROTECTED]:
 Hi all,

 We are using php to connect to a local MS SQL database, and all seems to be
 fine.
 We are connecting to several tables within the same database, and are able
 to insert, update, delete, etc.
 However, there is one table that refuses to let us update, and we can not
 figure out why.

 We get no errors from the script, but no records updated.
 If I echo out the sql statement, connect to the database with Access as the
 same user, and copy/paste the query into Access, the update works.

 We have looked at the table in every way we know how to look, and we can't
 find anything that would stop php from doing updates.

 The table is part of a purchased application and is a very important one, so
 we are wondering if there could be some restrictions defined somewhere.
 Any thoughts on where to look?
 Any special log somewhere that might tell us why the updates aren't working?

 Any help appreciated.
 steve





  • The WDVL Discussion List from WDVL.COM • 
 To Join wdvltalk, Send An Email To:
 mailto:[EMAIL PROTECTED] or
 use the web interface
 http://e-newsletters.internet.com/discussionlists.html/
  Send Your Posts To: wdvltalk@lists.wdvl.com
 To change subscription settings, add a password or view the web interface:
 http://intm-dl.sparklist.com/read/?forum=wdvltalk

   http://www.wdvl.com  ___

 You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
 To unsubscribe send a blank email to
 [EMAIL PROTECTED]
 To unsubscribe via postal mail, please contact us at:
 Jupitermedia Corp.
 Attn: Discussion List Management
 475 Park Avenue South
 New York, NY 10016

 Please include the email address which you have been contacted with.


 � The WDVL Discussion List from WDVL.COM � 
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
   Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

  http://www.wdvl.com  ___

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Re: [wdvltalk] strange mssql problem

2008-11-19 Thread Cheryl Hewitt
Steve,

I just wanted to put it out there that you should be accessing the tables via 
views and stored procedures that have permissions set up and not directly 
accessing the table from the call on the php page. 

Do you have query analyzer? You could drop your SQL statement into there and 
run it to see if it runs or if there is an error. 

Can you post your query here?

-Cheryl

 steve miller [EMAIL PROTECTED] wrote: 

=
Hi all,

We are using php to connect to a local MS SQL database, and all seems  
to be fine.
We are connecting to several tables within the same database, and are  
able to insert, update, delete, etc.
However, there is one table that refuses to let us update, and we can  
not figure out why.

We get no errors from the script, but no records updated.
If I echo out the sql statement, connect to the database with Access  
as the same user, and copy/paste the query into Access, the update  
works.

We have looked at the table in every way we know how to look, and we  
can't find anything that would stop php from doing updates.

The table is part of a purchased application and is a very important  
one, so we are wondering if there could be some restrictions defined  
somewhere.
Any thoughts on where to look?
Any special log somewhere that might tell us why the updates aren't  
working?

Any help appreciated.
steve





 • The WDVL Discussion List from WDVL.COM • 
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
   Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

  http://www.wdvl.com  ___

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

 � The WDVL Discussion List from WDVL.COM � 
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
   Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

  http://www.wdvl.com  ___

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.


Re: [wdvltalk] strange mssql problem

2008-11-19 Thread steve miller

Thanks Ross.
The person I am working with has access to the database (he's the IT  
person for the company), and he should be able to get the tools and  
do the looking. He has already looked at the table permissions with  
whatever tools sqlserver comes with, and he doesn't see anything  
different from the other tables that we CAN update. The strange thing  
is that we can update one table, and using the same connect strings  
and user we can't update the other.


I'll pass this along and see what comes up!

thanks


On Nov 19, 2008, at 10:52 AM, Ross Clutterbuck wrote:


Steve:

I had to use SQL Server recently and I found it to be a pain with
things like this, especially when I have next-to-no experience with
it. I can't really suggest where to look to fix your issues directly,
but two things I found very useful in working out my own issues:

-- write a script in ASP (if you can) that performs the same
operations on this table as you're trying to do in PHP to see if
there's any problem interfacing with this table over web techs (for
some reason I did)
-- if you don't already have it, try accessing the SQL Server using
SQL Server Management Studio (tis free from MSDN) and have a play.
There's some nice tools in there to check connections, permissions and
such, plus you can run queries directly through the GUI and get
feedback. I think there's also extensive logging you can access too so
that might show up weirdness if things don't behave the way you'd
expect.

Sorry I can't help much more than that!

MOU

2008/11/19 steve miller [EMAIL PROTECTED]:

Hi all,

We are using php to connect to a local MS SQL database, and all  
seems to be

fine.
We are connecting to several tables within the same database, and  
are able

to insert, update, delete, etc.
However, there is one table that refuses to let us update, and we  
can not

figure out why.

We get no errors from the script, but no records updated.
If I echo out the sql statement, connect to the database with  
Access as the

same user, and copy/paste the query into Access, the update works.

We have looked at the table in every way we know how to look, and  
we can't

find anything that would stop php from doing updates.

The table is part of a purchased application and is a very  
important one, so
we are wondering if there could be some restrictions defined  
somewhere.

Any thoughts on where to look?
Any special log somewhere that might tell us why the updates  
aren't working?


Any help appreciated.
steve



 • The WDVL Discussion List from WDVL.COM • 
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
  Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

  http://www.wdvl.com  ___

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.


Re: [wdvltalk] strange mssql problem

2008-11-19 Thread steve miller

I'll check on the field types and give it a whirl.

thanks!

On Nov 19, 2008, at 12:58 PM, Cheryl Hewitt wrote:

You are using MS SQL, right? If you are using a view then you can  
set rights as to what the view can do (i.e. select, update, delete)  
for a specific user role. It is just a level of protection. Same  
thing goes for stored procedures.


If those are integer fields, then do this:
update Customers set zipcode= 12345 where CustomerId= 23456
(no single quotes/ticks)

HTH,

Cheryl



 • The WDVL Discussion List from WDVL.COM • 
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
  Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

  http://www.wdvl.com  ___

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.