SunQuest
           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:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old July 17th, 2003, 10:19 AM
Bobba Buoy Bobba Buoy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 51 Bobba Buoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 42 sec
Reputation Power: 6
ADODC Question

Can you use a sql statement that includes a join for a recordsource in an adodc control? I am having trouble getting a data grid to 'behave' trying to set it's recordsource properties in code. Here is my code:

Code:

    sql = "SELECT * FROM PartData pd INNER JOIN RaceData rd ON pd.RaceID = rd.RaceID "
    sql = sql & "WHERE rd.EventID = " & lEventID & " ORDER BY pd.LastName, pd.FirstName"
    Set rs = New Recordset
    rs.Open sql, conn, adOpenStatic, adLockOptimistic
    Set dgPartData.DataSource = rs
    dgPartData.Refresh


Could I use this in an adodc as the recordsource?

Thanks!

Reply With Quote
  #2  
Old July 17th, 2003, 02:14 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,717 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 40 m 34 sec
Reputation Power: 688
What do you mean by "behave"? Are you getting an error?

Reply With Quote
  #3  
Old July 17th, 2003, 02:41 PM
Bobba Buoy Bobba Buoy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 51 Bobba Buoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 42 sec
Reputation Power: 6
No, I am not getting an error. The form that contains the grid is an MDI CHild and it kind of gives me this 'quivering' action and when I (for instance) try to leave the program, the YesNo message box that confirms this action doesn't show up. I think it is behind the child form because if I hit the enter key, the program terminates as expected.

It has really got me puzzled. I changed my code to what I think is a more direct approach:

Code:

    sql = "SELECT * FROM PartData pd INNER JOIN RaceData rd ON pd.RaceID = rd.RaceID "
    sql = sql & "WHERE rd.EventID = " & lEventID & " ORDER BY pd.LastName, pd.FirstName"
    Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=VIRA;Data Source=BOB"
    Adodc1.RecordSource = sql
    Set dgPartData.DataSource = Adodc1


but it still has the same issues. It shows up ok but the issues arise when I update it. Maybe what I really need is to know how to refresh the grid? Any ideas? Does it have to do with the command text? I have the command type set at Command Unknown (since it's not a table).

Any help would be much appreciated!!!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > ADODC Question


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


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





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