Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple ID Generator Not Fast
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Simple ID Generator Not Fast
Miscellaneous
Thread ID:
00587741
Message ID:
00587741
Views:
55
I made a free table with two columns iValue and iDel (both integers). There are 500,000 rows in the table. With the following ASP I get a value the way I want it. However, it is much slower than having 50,000 rows in the table. Why? I have simple indexes on both columns.
Response.Buffer = True
Response.ContentType = "text/xml"
Set oConn = Server.CreateObject("ADODB.Connection")
With oConn
    .ConnectionString = "Provider=VFPOLEDB.1;Data Source=E:\localweb;Deleted=Off;Password=;Collating Sequence=MACHINE"
    .CursorLocation = 2	'	adUseServer
    .Mode = 16			'	adModeShareDenyNone
    .Open
End With
Application.Lock
arResult = oConn.Execute("Select iValue from UniqInt02 Where iDel=0 Order by iValue Top 1").GetRows
oConn.Execute("Update UniqInt01 Set iDel=1 Where iValue=" & arResult(0,0) )
Application.Unlock
Response.Write "<?xml version="&Chr(34)&"1.0"&Chr(34)&"?><ROOT><response><ivalue> " & arResult(0,0) & "</ivalue></response></ROOT>" ' There is an XML string there you just can't see it on the UT
Set oConn = Nothing
Next
Reply
Map
View

Click here to load this message in the networking platform