Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2008, 10:15 PM
Registered User
 
Join Date: Apr 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default updating table w/ query that has left join

Hi,
I'm trying to update a table using a form bound to a query:

select a.pid, a.bid, b.selected
from customers as a left join providers as b on (a.pid=b.pid) and (a.bid=b.bid)


in one computer it works, and wen I click on the selected (a yes/no field) it updates the providers table. However, when I try it in another computer it does not work. Any ideas??

Thanks,
Margarita

 
Old April 10th, 2008, 10:25 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Since you are presenting a SELECT statement I will assume you are trying to update a Table contained within your windows form and not a database table.

I really don't have an answer to this since there is nothing profound in the SELECT statement or in your description that points to a problem. Since, I assume, you are working with a windows application do both machines have the most updated version of the application? Are you silently handling errors which may be covering up the problem? (By silently I mean using a Try Catch block where the catch block is empty thus your error is never dealt with).

Very strange indeed.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old April 11th, 2008, 07:32 AM
Registered User
 
Join Date: Apr 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I'm trying to update the field bound to the checkbox in through a form. No error handling -pretty basic form. Need to check versions, though.

 
Old April 11th, 2008, 09:55 AM
Registered User
 
Join Date: Apr 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it works on Access 2003 although dbatase is saved as Access 2000. I have access 200 in my computer and it doesn't work. It should if in the other computer is saved as access 2000, shouldn't it?

 
Old April 11th, 2008, 11:26 AM
Registered User
 
Join Date: Apr 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi All,
Seems like the problem's solved. The only requirement for the query to work is that all the tables in the query must have a primary key, otherwise the underlying recordset generated by the query is not updatable.

Margarita








Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating query using inner join sintax error gfranco Access 0 April 18th, 2008 10:08 PM
Update Query using inner join with a linked table ceekay Access 3 June 8th, 2007 12:35 PM
left join msrnivas Classic ASP Databases 2 October 15th, 2004 07:37 AM
Left Join-Count Records On 2nd Table harpua Classic ASP Databases 1 September 16th, 2004 02:49 AM
Oracle 8i inner join and left join problem puteri_84 Oracle 2 August 19th, 2004 07:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.