You are here:

Visual Basic/Vb 6.0 + ACCESS

Advertisement


Question
Hello sir,
I am doing project on ONLINE RAILWAY RESERVATION SYSTEM;
I am almost done but have this small problem.
i have used dataenvironment in my project AND ACCESS FOR DATABASE.
A user can book more than one ticket from his account and there is form which displays all the previous transactions(Previous booking) of that user.
THE PROBLEM IS THAT EVEN IF THE USER HAS BOOKED TICKET MORE THAN ONCE THEN ALSO IT DISPLAYS ONLY ONE TRANSACTION IN TEXT BOX.
I WANT TO DISPLAY ALL HIS TRANSACTIONS IN VARIOUS TEXT BOX IN THAT FORM OR IN DATAGRID FOR THAT USER TRANSCATION ONLY

Answer
when you use dataenvironment, you need to use datareport to show the results. you need to use the sql in DE  "select * from Tablename where Userid=?"

and in datareport you can use

Private Sub Command1_Click()

With DataEnvironment1
.Command1 Text1  ' or val(text1) for numbers
End With

If Text1 = ""  Then Exit Sub
If DataEnvironment1.rsCommand1.RecordCount > 0 Then
         DataReport1.Show
End If


why not use adodb? this will solve your problems of display in datagrid: all transactions for a particular id

Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


Ravindra

Expertise

visual basic application programming from design to access information, sql, engineering and commercial applications. access databases, excel.(VB6) basic questions in vb 2008. Optional: 1)a large number of people want me to do work which takes some time and effort. can do projects in vb 2008. Pl.note that i would like to be paid for such work. 2) if you want me to spend quality time and do special work, i expect to be paid a reasonable price for my time. 3) if you are pleased with my reply you could consider a good amount. 4) you can visit my website http://ravindra.coolpage.biz

Experience

programming since the past 15 years. have completed a large number of projects in Industrial applications, finance,accounts, correspondence. excel macros etc

Education/Credentials
engineering, management degrees.

Past/Present Clients
project work for a Norway company,USA company and a Canadian company completed. Freelance Project work and Teaching. helping programmers with their work
teaching vb

©2016 About.com. All rights reserved.