Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old March 18th, 2003, 09:48 PM
iamtgo3 iamtgo3 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: USA
Posts: 312 iamtgo3 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 27 m 43 sec
Reputation Power: 7
Send a message via ICQ to iamtgo3 Send a message via AIM to iamtgo3 Send a message via MSN to iamtgo3 Send a message via Yahoo to iamtgo3
ADO.NET and SQL Queries

I am trying to do a join with ADO.NET. I have tested this Query is both Access and SQL Server and it works fine so I am thinking I missed something on my form. Here is the query it ain't pretty and may not be the best way to do it but it works. I think my error has to be something with the connection on my VB.NET form. It is one of those errors that drive you nuts cause the solution will probably have nothing to do with the query.
PHP Code:
 SELECT Sales.SalesIDSales.WinningBidItems.LocationItems.DescriptionBidder.BidderNumberBidder.NameBidder.AddressBidder.CityBidder.StateBidder.ZipBidder.Phone
FROM 
(Bidder INNER JOIN Sales ON Bidder.BidderNumber Sales.BidderNumberINNER JOIN Items ON Sales.ItemLocation Items.Location
WHERE 
(Sales.BidderNumber '1'

Here is my error if it helps at all.
PHP Code:
 Syntax error (missing operatorin query expression 'Bidder.BidderNumber = Sales.BidderNumber INNER JOIN Items ON Sales.ItemLocation = Items.Location'

Now what I have found out is if you use the DataAdapter control it does not do multiple joins really well. What I had to do is program this through code with out controls. When I added the multiple join to the DataAdaper it would rewrite it like this.
PHP Code:
 SELECT Sales.SalesIDSales.WinningBidItems.LocationItems.DescriptionBidder.BidderNumberBidder.NameBidder.AddressBidder.CityBidder.StateBidder.ZipBidder.Phone
FROM Bidder INNER JOIN Sales ON Bidder
.BidderNumber Sales.BidderNumber INNER JOIN Items ON Sales.ItemLocation Items.Location
WHERE 
(Sales.BidderNumber '1'

This would give me the error stated above. So if you are having trouble getting more complex SQL Queries to work with the DataAdapter you may nee to skip the easy way out and do this through code and it should work just fine.
__________________
George - www.ipdg3.com
Helping Developers and Programmers Find Resources
Forums - Contests - Tutorials - Source Code
ORB - Wireless Site - Online Gear

Last edited by iamtgo3 : March 20th, 2003 at 08:22 AM.

Reply With Quote
  #2  
Old May 30th, 2003, 09:03 AM
cmavin cmavin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 cmavin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Inner joins?

Did you ever get this to work?
i'm ado programmer and i'm undertaking an ado.net project at the moment, does the ado.net data adapter even support joins? i've heard that you need a different data adapter for each table you want to access.

Reply With Quote
  #3  
Old May 30th, 2003, 09:17 AM
iamtgo3 iamtgo3 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: USA
Posts: 312 iamtgo3 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 27 m 43 sec
Reputation Power: 7
Send a message via ICQ to iamtgo3 Send a message via AIM to iamtgo3 Send a message via MSN to iamtgo3 Send a message via Yahoo to iamtgo3
Well I did a work around if I remembr correctly. I think I just did it through code. What I think you can do is a single JOIN but not a multiple JOINS with the DataAdapter control. ADO.NET works great it is just a matter of understanding the differences and how it works. I have found it is easier to do complex things through code rather then controls.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > ADO.NET and SQL Queries


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway