vb.net connection to a firebird database
-
How do i browse to let's say 10 records before the last one? Code below:
Dim con As String =
"User=SYSDBA;PASSWORD=masterkey;Database=/DATABASE/TIME_DBS/TC_SHPIRAG3ST4.gdb;Datasource=192.168.2.78;Port=3050;Dialect=3"
Dim conexiune As FbConnection = New FbConnection(con)
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
conexiune.Open()
Try
Dim sCmd As FbCommand
Dim sql As String
Dim ds As FbDataReader
sql = "select * from RT_TIME ORDER BY RTTI_COUNTER desc"
sCmd = New FbCommand()
sCmd.Connection = conexiune
sCmd.CommandText = sql
ds = sCmd.ExecuteReader
ds.Read()TextBox1.Text = ds("RTTI\_BIT\_POS") Label1.Text = ds("RTTI\_HOOK\_POS") ds.Close() conexiune.Close() Catch ex As FirebirdSql.Data.FirebirdClient.FbException MsgBox(ex.ToString, vbCritical, "DB Error") End Try End Sub
-
How do i browse to let's say 10 records before the last one? Code below:
Dim con As String =
"User=SYSDBA;PASSWORD=masterkey;Database=/DATABASE/TIME_DBS/TC_SHPIRAG3ST4.gdb;Datasource=192.168.2.78;Port=3050;Dialect=3"
Dim conexiune As FbConnection = New FbConnection(con)
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
conexiune.Open()
Try
Dim sCmd As FbCommand
Dim sql As String
Dim ds As FbDataReader
sql = "select * from RT_TIME ORDER BY RTTI_COUNTER desc"
sCmd = New FbCommand()
sCmd.Connection = conexiune
sCmd.CommandText = sql
ds = sCmd.ExecuteReader
ds.Read()TextBox1.Text = ds("RTTI\_BIT\_POS") Label1.Text = ds("RTTI\_HOOK\_POS") ds.Close() conexiune.Close() Catch ex As FirebirdSql.Data.FirebirdClient.FbException MsgBox(ex.ToString, vbCritical, "DB Error") End Try End Sub
You could try something of what was suggested here: [SQL Server SELECT LAST N Rows - Stack Overflow](https://stackoverflow.com/questions/4193705/sql-server-select-last-n-rows)
-
You could try something of what was suggested here: [SQL Server SELECT LAST N Rows - Stack Overflow](https://stackoverflow.com/questions/4193705/sql-server-select-last-n-rows)
thanks, i didn't find the right information
-
You could try something of what was suggested here: [SQL Server SELECT LAST N Rows - Stack Overflow](https://stackoverflow.com/questions/4193705/sql-server-select-last-n-rows)
nevermind, found it: sql = "select FIRST 1 SKIP 10 * from RT_TIME ORDER BY RTTI_COUNTER desc "
-
You could try something of what was suggested here: [SQL Server SELECT LAST N Rows - Stack Overflow](https://stackoverflow.com/questions/4193705/sql-server-select-last-n-rows)