Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,166,347 members, 7,864,641 topics. Date: Tuesday, 18 June 2024 at 10:47 PM

Lewisebint's Posts

Nairaland Forum / Lewisebint's Profile / Lewisebint's Posts

(1) (of 1 pages)

Programming / Re: Post Ur Vb 6.0 Questions Here by lewisebint: 12:41pm On Sep 23, 2007
lola 004:

CAN ANY ONE HELP ME WITH THE USES OF DATA WINDOW IN VB6?
AND ALSO HOW TO CONNECT TO DATA BASE (ACCESS) WITH OUT USING ADO FORMAT

Data windows is used to create MS Access 97 abd below only. We have beter way of creating and connecting to database instead of data windows. Data window I mean the one under Addin Menu. Instead of using that to create, use MS Access to create if it is a must u want to use Access.

How to connect using Ado.

Dim db as new ADOD.Connection
Dim rs as new ADOD.Recordset

db.connectionstring=""
set rs=db.execute("Select * from tblname"wink

' then do ur manipulation
Dynast:

I nave a database of applicants, I want my software to filter and bring out qualified individuals based on the scores of at least 3 criteria I have specified. After the filtering, I would want to click on a control say command button to randomise those records that meet the criteria and then bring out one person only. If I click againg it should be able to pick another person on the qualified list at randon. It should pick only one person at a time and any body picked once should leave the list so that he will not be picked again or may still remain there but will not be picked more than once

Make connecttion to database which I know you know how to make do.
you SQL statement would be "Select fname from tblname where fname=''"

Create two arrays of equall size

Store all the values in one array

say
k=0
Do while not rs.eof
a(k)=rs.field(0).value
k=k+1
rs.movenext
loop
rs.close

Private Sub Comman1_Click
dim L as integer
L=int(rnd*K)
msgbox a(L)

'Remove value in A(L) and put in B(L) such dat you dont see it again

End sub

I hope this algorithm will help you out.
If it dosnt.
I will write the reall program for you. But it is going to be good u do it urself.

(1) (of 1 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.