|
-
Jan 7th, 2006, 08:45 PM
#1
Thread Starter
Lively Member
Doubt with recordset
Hi! I have a doubt with recordset and mshflexgrid.
I have a recordset with this rows
Microsoft
Linux
Unix
Solar
As we all know, when the mshflexgrid shows the recordset it shows everything starting from the first row (Microsoft). I want to make mshflexgrid to ignore the first row and start from the next so it shows
Linux
Unix
Solar
I hope you can understan my english and help me!
Thanks!
Last edited by Frehley; Jan 7th, 2006 at 08:55 PM.
-
Jan 7th, 2006, 08:49 PM
#2
Re: Doubt with recordset
Post the code that you are using to load the flexgrid.
-
Jan 7th, 2006, 08:53 PM
#3
Re: Doubt with recordset
You have your flex bounded to another control? Or you populate it manually?
-
Jan 7th, 2006, 08:54 PM
#4
Thread Starter
Lively Member
Re: Doubt with recordset
It is
VB Code:
Set MSHFlexGrid.DataSource = rs
( on the form load )
Thanks!
-
Jan 7th, 2006, 08:58 PM
#5
Re: Doubt with recordset
But how do you create your recordset? If you want to avoid any value then set where clause in your sql statement:
strSQL = "select * from table1 where field1 <> 'somevalue'"
rs.Open strSQL, adoConnection
-
Jan 7th, 2006, 09:03 PM
#6
Thread Starter
Lively Member
Re: Doubt with recordset
These are the recordsets:
VB Code:
Private Sub Form_Initialize()
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\database.mdb"
Set cn = New ADODB.Connection
cn.ConnectionString = strconn
cn.CursorLocation = adUseClient
cn.Open
Set rs = New ADODB.Recordset
rs.Open "select viajes.desde, viajes.hasta,viajes.id_socio,viajes.anombrede,viajes.id_auto, viajes.espera, viajes.hora from viajes", cn, adOpenDynamic, adLockOptimistic
Set rs2 = New ADODB.Recordset
rs2.Open "choferes", cn, adOpenDynamic, adLockOptimistic
Set rs3 = New ADODB.Recordset
rs3.Open "socios", cn, adOpenDynamic, adLockOptimistic
Set rs4 = New ADODB.Recordset
rs4.Open "select choferes.id_auto, viajes.desde, viajes.hasta, socios.id_socio, viajes.espera from viajes, socios, choferes where viajes.id_socio = socios.id_socio and viajes.id_auto = choferes.id_auto", cn, adOpenDynamic, adLockOptimistic
Set rs5 = New ADODB.Recordset
rs5.Open "reservaciones", cn, adOpenDynamic, adLockOptimistic
Set rs6 = New ADODB.Recordset
rs6.Open "select choferes.id_auto,choferes.chofer, choferes.estado from choferes", cn, adOpenDynamic, adLockOptimistic
Set Form1.rs7 = New ADODB.Recordset
rs7.Open "select socios.id_socio, socios.nombre, socios.telefono, socios.direccion from socios", cn, adOpenDynamic, adLockOptimistic
Set rs8 = New ADODB.Recordset
rs8.Open "select saldo.id_auto, saldo.saldo, saldo.fecha from saldo", cn, adOpenDynamic, adLockOptimistic
Set rs9 = New ADODB.Recordset
rs9.Open "select saldo.saldo, saldo.id_auto, saldo.fecha from saldo", cn, adOpenDynamic, adLockOptimistic
End Sub
I have to ignore "No Borrar", there is one in each recordset, alwais in the first row.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|