Re: [wdvltalk] strange mssql problem
steve miller wrote: Thanks for the thoughts Zach. It is definitely a table, not a view. We did try pasting on of the sql staements into our interface, and the update worked fine. This means the actual syntax is correct and the table is up-dateable. Just can't get it to work from within php... Maybe you could share the pertinent parts of the script, in case any of us can see something subtly wrong with it? http://wdvl.pastebin.com/ would be a good place to dump it, as long as there's nothing confidential in the bit of code you're pasting of course :) Cheers Dave P 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
I would be sure that the table that you are trying to update is an actual table and not a view. Also, as someone else suggested, put a breakpoint in your code where the final sql query string is created, copy that query and run it against the db using Management Studio. You will get an error message there if there is one. Zach On Wed, Nov 19, 2008 at 10:04 AM, 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. -- Zachary Kent 148 Sterling Hill Road Barre, VT 05641 (978) 296-4401 • 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
Thanks for the thoughts Zach. It is definitely a table, not a view. We did try pasting on of the sql staements into our interface, and the update worked fine. This means the actual syntax is correct and the table is up-dateable. Just can't get it to work from within php... steve On Dec 8, 2008, at 4:04 PM, Zachary Kent wrote: I would be sure that the table that you are trying to update is an actual table and not a view. Also, as someone else suggested, put a breakpoint in your code where the final sql query string is created, copy that query and run it against the db using Management Studio. You will get an error message there if there is one. Zach On Wed, Nov 19, 2008 at 10:04 AM, 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.
Re:[wdvltalk] strange mssql problem
steve wrote... 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. Tim responds: One thing you might check is if the table in question has a primary key. In some situations the lack of a primary key will prevent DBMSs from updating rows (i.e. it doesn't have any way to lock the record). This problem usually doesn't throw an error (speaking from experience). 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
Hi Tim, I'll check, but I'm almost positive there is a primary key because this is a main Customer table which identifies all the important info about the clients. steve On Nov 20, 2008, at 9:35 AM, Furry, Tim wrote: steve wrote... 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. Tim responds: One thing you might check is if the table in question has a primary key. In some situations the lack of a primary key will prevent DBMSs from updating rows (i.e. it doesn't have any way to lock the record). This problem usually doesn't throw an error (speaking from experience). The WDVL Discussion List from WDVL.COM To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] dl.sparklist.com 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.
[wdvltalk] strange mssql problem
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
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
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
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
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.