Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. vb.net connection to a firebird database

vb.net connection to a firebird database

Scheduled Pinned Locked Moved Database
databasequestioncsharphelp
5 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 7678276
    wrote on last edited by
    #1

    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
    
    V 1 Reply Last reply
    0
    • M Member 7678276

      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
      
      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      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)

      M H 3 Replies Last reply
      0
      • V Victor Nijegorodov

        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)

        M Offline
        M Offline
        Member 7678276
        wrote on last edited by
        #3

        thanks, i didn't find the right information

        1 Reply Last reply
        0
        • V Victor Nijegorodov

          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)

          M Offline
          M Offline
          Member 7678276
          wrote on last edited by
          #4

          nevermind, found it: sql = "select FIRST 1 SKIP 10 * from RT_TIME ORDER BY RTTI_COUNTER desc "

          1 Reply Last reply
          0
          • V Victor Nijegorodov

            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)

            H Offline
            H Offline
            hayac h
            wrote on last edited by
            #5

            thax i'll try Pakistan Real Estate[^]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups