473,396 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Random Database Info?

Hi, I'm using databases to try to make an AI that reads a random database entry based on the point in conversation. My problem at the moment is the database. I have it connected and am able to access it to write and read. But, what I need now, is a way to parse the list so I can make it pick a random entry.


I'm using the ADODB Component. I'm looking for maybe a list variable or something along those lines or maybe a way to just pick a random Item from an actual on-dialog list.

Thank you!


-Alex
Dec 16 '07 #1
3 1264
Dököll
2,364 Expert 2GB
Hi, I'm using databases to try to make an AI that reads a random database entry based on the point in conversation. My problem at the moment is the database. I have it connected and am able to access it to write and read. But, what I need now, is a way to parse the list so I can make it pick a random entry.


I'm using the ADODB Component. I'm looking for maybe a list variable or something along those lines or maybe a way to just pick a random Item from an actual on-dialog list.

Thank you!


-Alex
Hello, Alex, Welcome!

Please tell us little more...a bit of your code may give us some direction also.

Are you making a voice recognition software? Still stay tuned if you ahve not heard word just yet. It is porbably you have realized most expert are on different time zones, should get some hits nonetheless:-)

In a bit!

Dököll
Dec 16 '07 #2
Hello, Alex, Welcome!

Please tell us little more...a bit of your code may give us some direction also.

Are you making a voice recognition software? Still stay tuned if you ahve not heard word just yet. It is porbably you have realized most expert are on different time zones, should get some hits nonetheless:-)

In a bit!

Dököll

It's not voice recognition yet, at the moment I was just trying for a bit of a chatter bot. As for the code thing, it's on my laptop and its not really too relative to the discussion because at the moment all its doing is getting all the data from the 'Greetings' field of the table to the list.

Here's a little portion just retyped:

Do While Not .EOF
List1.AddItem(.Fields("Greetings").Value)

.MoveNext
Loop

That's what adds it to the list it's inside a With RS which is my Recordset name.

Hope that helps and thank's for the quick reply :-)
Dec 16 '07 #3
It's not voice recognition yet, at the moment I was just trying for a bit of a chatter bot. As for the code thing, it's on my laptop and its not really too relative to the discussion because at the moment all its doing is getting all the data from the 'Greetings' field of the table to the list.

Here's a little portion just retyped:

Do While Not .EOF
List1.AddItem(.Fields("Greetings").Value)

.MoveNext
Loop

That's what adds it to the list it's inside a With RS which is my Recordset name.

Hope that helps and thank's for the quick reply :-)

Oh, I'm looking into arrays but it keeps saying the number for the array must be constant but I'm trying to use a variable, Dim IDBTem(xya) as String then where xya = List1.ListCount ((The list is filled with the data from the db table a step before that so that's not the problem)) Any Ideas?
Dec 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Trythat | last post by:
This might seem a stupid question but here goes - I wrote a key generator for one of my programs in Visual Basic, so I recieve sales notification via email and then use my program to generate the...
14
by: Miranda | last post by:
Hi, I have a ASP/vbscript program that generates random passwords. The problem is I need to insert those passwords into an Access database of 327 clients. I have the random password program...
2
by: sugaray | last post by:
I want to write a school computer billing system, one of the function is to distribute machine id using rand() for each student log on, suppose there's 100 machines, when each person log on, the...
1
by: Steven Smith | last post by:
Hi guys When working with random access files .NET creates, saves to and loads from a default location (i.e. the solutions bin directory) how can I specify at runtime where I want these...
3
by: VB.NET | last post by:
I'm using a mysql database and connecting my vb.net program to the DB over a network connection. i would like to bring this data over to a vb.net random access file. does anyone know how to...
26
by: Jimmy | last post by:
ill have a database with 1 table and 3 fields: ID FIRSTNAME LASTNAME (the ID field will be the auto incrementing index) there might be 10 records in the DB, there might be 10,000. i...
1
by: Sahus Pilwal | last post by:
Hi, I hope someone can help me with this. I'm new to .NET and in fact server side programming and have a small query I'm sure... I'm using the System.IO Namespace with a For - each and If then...
12
by: Juha Nieminen | last post by:
I'm trying to use a random number generator and rand() is just not up to the task (RAND_MAX is way too small). I searched in the help system and found the System::Random class which seems to be...
8
colinod
by: colinod | last post by:
I have a webpage that i want to show 6 random recordsets from the same database each of the records in the database has a unique number between 1 and 156 i can get the asp to return the random...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.