Click here to Skip to main content
15,891,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Need Help with Shuffle of a deck Pin
ymilan12-Apr-09 8:26
ymilan12-Apr-09 8:26 
GeneralRe: Need Help with Shuffle of a deck Pin
riced13-Apr-09 2:19
riced13-Apr-09 2:19 
GeneralRe: Need Help with Shuffle of a deck Pin
ymilan13-Apr-09 14:52
ymilan13-Apr-09 14:52 
GeneralRe: Need Help with Shuffle of a deck Pin
ymilan12-Apr-09 6:39
ymilan12-Apr-09 6:39 
GeneralRe: Need Help with Shuffle of a deck Pin
ymilan11-Apr-09 8:45
ymilan11-Apr-09 8:45 
AnswerRe: Need Help with Shuffle of a deck Pin
riced10-Apr-09 3:59
riced10-Apr-09 3:59 
GeneralRe: Need Help with Shuffle of a deck Pin
ymilan10-Apr-09 4:54
ymilan10-Apr-09 4:54 
QuestionVisual Studio, VB.Net ODBC Read from Progress Database Pin
RDCK9-Apr-09 8:51
RDCK9-Apr-09 8:51 
Attempting to read Progress 9.1E database from VB.Net. Connection is working and I am able to choose any table within the database. Canned Gridview, Dataset etc. will read the entire query result. The following code will only read the first record of the query ...

Public Class Requisition_Main

Private Sub BTNRefresh1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNRefresh1.Click

Dim DataRead As String = "DSN=[myodbc];Uid=[myusername];Pwd=[mypassword];server=[mydataserver]"

Dim con As New Odbc.OdbcConnection(DataRead)
Dim RecordNum As Odbc.OdbcDataReader
Dim AcctName As Odbc.OdbcDataReader
Dim GLAccount As String = Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + "gl-acc1" + Chr(34) + _
", " + Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + "gl-acc2" + Chr(34) + _
", " + Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + "gl-acc3" + Chr(34) + _
", " + Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + "gl-acc4" + Chr(34)

con.Open()
Dim recordcount As New Odbc.OdbcCommand("Select count(" + Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + "gl-acc1" + Chr(34) + _
") AS RecNum FROM PUB." + Chr(34) + "gl-mstr" + Chr(34) + " " + Chr(34) + "gl-mstr_0" + Chr(34) + _
" WHERE (" + Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + "fisc-yr" + Chr(34) + "=" & InputBox1.Text.ToString() & ")", con)
'
'recordcount = "Select count("gl-mstr_0"."gl-acc1") AS RecNum FROM PUB."gl-mstr" "gl-mstr_0" WHERE ("gl-mstr_0"."fisc-yr"=2004)"
'
RecordNum = recordcount.ExecuteReader()
RecordNum.Read()
CountTextBox.Text = RecordNum(0)
'
'CountTextBox.Text now equals "3918"
'
Dim cmd1 As New Odbc.OdbcCommand("Select " + GLAccount + " FROM PUB." + Chr(34) + "gl-mstr" + Chr(34) + _
" " + Chr(34) + "gl-mstr_0" + Chr(34) + " WHERE (" + Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + _
"fisc-yr" + Chr(34) + "=" & InputBox1.Text.ToString() & " and " + Chr(34) + "gl-mstr_0" + Chr(34) + "." + Chr(34) + _
"gl-acc1" + Chr(34) + "=" & InputBox2.Text.ToString() & ") ORDER BY " + GLAccount + "", con)
'
'cmd1 = "Select "gl-mstr_0"."gl-acc1", "gl-mstr_0"."gl-acc2", "gl-mstr_0"."gl-acc3", "gl-mstr_0"."gl-acc4" FROM PUB."gl-mstr" "gl-mstr_0" WHERE -
' ("gl-mstr_0"."fisc-yr"=2004 and "gl-mstr_0"."gl-acc1"=101) ORDER BY "gl-mstr_0"."gl-acc1", "gl-mstr_0"."gl-acc2", "gl-mstr_0"."gl-acc3", "gl-mstr_0"."gl-acc4""
'
AcctName = cmd1.ExecuteReader()

If AcctName.HasRows Then
AcctName.Read()

TxtGLmstrGLacc1.Text = AcctName.Item("gl-acc1").ToString
TxtGLmstrGLacc2.Text = AcctName.Item("gl-acc2").ToString
TxtGLmstrGLacc3.Text = AcctName.Item("gl-acc3").ToString
TxtGLmstrGLacc4.Text = AcctName.Item("gl-acc4").ToString

End If

AcctName.Close()
cmd1.Dispose()
End Sub
End Class


Any insight would be greatly appreciated.
AnswerRe: Visual Studio, VB.Net ODBC Read from Progress Database Pin
Johan Hakkesteegt9-Apr-09 9:35
Johan Hakkesteegt9-Apr-09 9:35 
GeneralRe: Visual Studio, VB.Net ODBC Read from Progress Database Pin
RDCK14-Apr-09 12:40
RDCK14-Apr-09 12:40 
QuestionRounding problem w/ var of type single Pin
Jon_Boy9-Apr-09 7:09
Jon_Boy9-Apr-09 7:09 
AnswerRe: Rounding problem w/ var of type single Pin
Jon_Boy9-Apr-09 7:22
Jon_Boy9-Apr-09 7:22 
AnswerRe: Rounding problem w/ var of type single Pin
Dave Kreskowiak9-Apr-09 7:46
mveDave Kreskowiak9-Apr-09 7:46 
GeneralRe: Rounding problem w/ var of type single Pin
Jon_Boy9-Apr-09 7:59
Jon_Boy9-Apr-09 7:59 
GeneralRe: Rounding problem w/ var of type single Pin
Dalek Dave9-Apr-09 9:01
professionalDalek Dave9-Apr-09 9:01 
QuestionHow can I add a column using VB? Pin
enipla9-Apr-09 5:28
enipla9-Apr-09 5:28 
AnswerRe: How can I add a column using VB? Pin
Jon_Boy9-Apr-09 6:32
Jon_Boy9-Apr-09 6:32 
GeneralRe: How can I add a column using VB? Pin
enipla9-Apr-09 7:40
enipla9-Apr-09 7:40 
GeneralRe: How can I add a column using VB? Pin
enipla9-Apr-09 8:12
enipla9-Apr-09 8:12 
QuestionSyncLocking [modified] Pin
captainmogo9-Apr-09 4:45
captainmogo9-Apr-09 4:45 
AnswerRe: SyncLocking Pin
Dave Kreskowiak9-Apr-09 8:08
mveDave Kreskowiak9-Apr-09 8:08 
GeneralRe: SyncLocking Pin
captainmogo9-Apr-09 8:14
captainmogo9-Apr-09 8:14 
GeneralRe: SyncLocking Pin
Dave Kreskowiak9-Apr-09 8:18
mveDave Kreskowiak9-Apr-09 8:18 
GeneralRe: SyncLocking [modified] Pin
captainmogo9-Apr-09 8:30
captainmogo9-Apr-09 8:30 
QuestionClickonce and command line args? Pin
Jon_Boy9-Apr-09 3:44
Jon_Boy9-Apr-09 3:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.