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:
  #1  
Old January 19th, 2004, 06:40 AM
collegebloke collegebloke is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 66 collegebloke User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 13 m 43 sec
Reputation Power: 6
vb and access

hi i have to query an access table from a vb query, the query is as follows

query = "SELECT Day,DepTime,ArrPoint From RouteSchedule WHERE ((Cint(RouteSchedule.RouteNos)='" & CInt(Parser(1)) & "'));"
rec.Open query, db
rec.MoveFirst
WS.SendData databaseCommand & "," & rec.Fields(CStr("Day")).Value & (",") & rec.Fields(CStr("DepTime")).Value & (",") & rec.Fields(CStr("ArrPoint")).Value
db.Close

this qets the data then sends the chosen fields through the winsock connection to the client however when the data comes through to the client side there is only one row of data
eg. tuesday, 07.00, perth

however there should be several rows with several times and days, any help on where these are dissapearing to would be good.

Reply With Quote
  #2  
Old January 19th, 2004, 10:44 AM
williamcrawley williamcrawley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: uk
Posts: 91 williamcrawley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Your rec object should have the right amount of records. The problem looks as though you are just sending a single record.

Place it in a loop and move next :

if not (rec.bof and rec.eof) then
rec.MoveFirst
do while not rec.eof
WS.SendData databaseCommand & "," & rec.Fields(CStr("Day")).Value & (",") & rec.Fields(CStr("DepTime")).Value & (",") & rec.Fields(CStr("ArrPoint")).Value
rec.movenext
loop

Reply With Quote
  #3  
Old January 19th, 2004, 12:33 PM
collegebloke collegebloke is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 66 collegebloke User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 13 m 43 sec
Reputation Power: 6
Got that sorted but thanks for the help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > vb and access


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!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





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