|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
Got that sorted but thanks for the help.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > vb and access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|