Last Record In Table

Use Get List - or handle the issue in another way BPM for instance.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Michael McWilliams
Sent: 18 September 2008 17:06
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Last Record In Table



Because I do not know how to get the very last record. I can connect
& pull a specific. Should I be using some variation of GetRows and
then something else, to find the last record?
--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Stephen Edginton" <stephene@...>
wrote:
>
> Why are you not using the adapters?
>
>
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
> Of Michael McWilliams
> Sent: 18 September 2008 16:47
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Last Record In Table
>
>
>
> Is there a better way to get the Last record in a UD table than I
am
> using? I am using this from within Receipt Entry
> Dim conn As OdbcConnection
> Dim comm As OdbcCommand
> Dim dr As OdbcDataReader
> Dim connectionString As String
> Dim sql As String
> connectionString
> = "DSN=mfgsys803;UID=*******;Pwd=*******;"
> sql = "SELECT key1, key2, key3, key4, key5 FROM
> Mfgsys.Pub.UD03"
> Dim strLastLotNum As String
> conn = New OdbcConnection(connectionString)
> conn.Open()
> comm = New OdbcCommand(sql, conn)
> dr = comm.ExecuteReader()
> while (dr.Read())
> strLastLotNum = dr.GetValue(0)
> End While
> conn.Close()
> dr.Close()
> comm.dispose()
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Is there a better way to get the Last record in a UD table than I am
using? I am using this from within Receipt Entry
Dim conn As OdbcConnection
Dim comm As OdbcCommand
Dim dr As OdbcDataReader
Dim connectionString As String
Dim sql As String
connectionString
= "DSN=mfgsys803;UID=*******;Pwd=*******;"
sql = "SELECT key1, key2, key3, key4, key5 FROM
Mfgsys.Pub.UD03"
Dim strLastLotNum As String
conn = New OdbcConnection(connectionString)
conn.Open()
comm = New OdbcCommand(sql, conn)
dr = comm.ExecuteReader()
while (dr.Read())
strLastLotNum = dr.GetValue(0)
End While
conn.Close()
dr.Close()
comm.dispose()
Why are you not using the adapters?



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Michael McWilliams
Sent: 18 September 2008 16:47
To: vantage@yahoogroups.com
Subject: [Vantage] Last Record In Table



Is there a better way to get the Last record in a UD table than I am
using? I am using this from within Receipt Entry
Dim conn As OdbcConnection
Dim comm As OdbcCommand
Dim dr As OdbcDataReader
Dim connectionString As String
Dim sql As String
connectionString
= "DSN=mfgsys803;UID=*******;Pwd=*******;"
sql = "SELECT key1, key2, key3, key4, key5 FROM
Mfgsys.Pub.UD03"
Dim strLastLotNum As String
conn = New OdbcConnection(connectionString)
conn.Open()
comm = New OdbcCommand(sql, conn)
dr = comm.ExecuteReader()
while (dr.Read())
strLastLotNum = dr.GetValue(0)
End While
conn.Close()
dr.Close()
comm.dispose()





[Non-text portions of this message have been removed]
Because I do not know how to get the very last record. I can connect
& pull a specific. Should I be using some variation of GetRows and
then something else, to find the last record?
--- In vantage@yahoogroups.com, "Stephen Edginton" <stephene@...>
wrote:
>
> Why are you not using the adapters?
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
Behalf
> Of Michael McWilliams
> Sent: 18 September 2008 16:47
> To: vantage@yahoogroups.com
> Subject: [Vantage] Last Record In Table
>
>
>
> Is there a better way to get the Last record in a UD table than I
am
> using? I am using this from within Receipt Entry
> Dim conn As OdbcConnection
> Dim comm As OdbcCommand
> Dim dr As OdbcDataReader
> Dim connectionString As String
> Dim sql As String
> connectionString
> = "DSN=mfgsys803;UID=*******;Pwd=*******;"
> sql = "SELECT key1, key2, key3, key4, key5 FROM
> Mfgsys.Pub.UD03"
> Dim strLastLotNum As String
> conn = New OdbcConnection(connectionString)
> conn.Open()
> comm = New OdbcCommand(sql, conn)
> dr = comm.ExecuteReader()
> while (dr.Read())
> strLastLotNum = dr.GetValue(0)
> End While
> conn.Close()
> dr.Close()
> comm.dispose()
>
>
>
>
>
> [Non-text portions of this message have been removed]
>