By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,554 Members | 1,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,554 IT Pros & Developers. It's quick & easy.

Random Database Info?

P: 3
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
Share this Question
Share on Google+
3 Replies


Dököll
Expert 100+
P: 2,364
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

P: 3
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

P: 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

Post your reply

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