Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to get random generation with OleDb
Message
From
17/09/2006 18:17:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Unable to get random generation with OleDb
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01154512
Message ID:
01154512
Views:
68
When using OleDb, from VB.NET, to get data from Visual FoxPro, I cannot get the random generation to work. Basically, if I execute this line from VFP, I will get the expected result. This means at every SQL result, I get a random record sequence order.
SELECT TOP 10 RAND(),Video.Date,Video.Numero,Video.Title,Video.NoVideoT,Video.Notes_E,Video.Notes_F,Master.FirstName,;
 Master.LastName,Program.Title AS Program,Video.NoProgram,Video.NoClass,Video.Url;
 FROM Video;
 INNER JOIN Master ON Video.NoMaster=Master.Numero;
 LEFT JOIN Program ON Video.NoProgram=Program.Numero;
 WHERE Video.Date<=DATE() AND Video.Active;
 ORDER BY 1 DESC
But, if this line is called from VB.NET by the use of the OleDb, I will always get 0.91 for the RAND() value. Is there a way to make that work in that environment?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform