sal21
09-11-2007, 04:31 AM
Ho to order entire recordset in ANAGRAFICA1 by filed APPELLATIVO where in filed APPELLATIVO is blank?
move all blank recordset in the top of table, i think ASChttp://vbcity.com/forums/smiles/wink.gif
Note: in table are present 1.202.589 rds
piece of code:
Set DB2 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI\APPELLATIVI.MDB")
Set RSD2 = DB2.OpenRecordset("APP")
Set DB1 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI\ANAGRAFICA_OK_10092007.mdb")
Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1")
RITORNO:
With RSD1
Do While Not RSD1.EOF
If RSD1.Fields("APPELLATIVO") = "" Then
COPE = RSD1.Fields("COPE")
Call INSERISCIANAGRAFICA(COPE)
RSD1.MoveNext
Else
RSD1.MoveNext
End If
Loop
End With
move all blank recordset in the top of table, i think ASChttp://vbcity.com/forums/smiles/wink.gif
Note: in table are present 1.202.589 rds
piece of code:
Set DB2 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI\APPELLATIVI.MDB")
Set RSD2 = DB2.OpenRecordset("APP")
Set DB1 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI\ANAGRAFICA_OK_10092007.mdb")
Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1")
RITORNO:
With RSD1
Do While Not RSD1.EOF
If RSD1.Fields("APPELLATIVO") = "" Then
COPE = RSD1.Fields("COPE")
Call INSERISCIANAGRAFICA(COPE)
RSD1.MoveNext
Else
RSD1.MoveNext
End If
Loop
End With