Click here to Skip to main content
15,894,362 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: configure crystal report2008 with vb6.0 Pin
Christian Graus17-Mar-09 20:39
protectorChristian Graus17-Mar-09 20:39 
GeneralRe: configure crystal report2008 with vb6.0 Pin
demetter18-Mar-09 21:28
demetter18-Mar-09 21:28 
QuestionListbox to textboxes Pin
hendrikbez17-Mar-09 19:37
hendrikbez17-Mar-09 19:37 
I am trying to when I click on a name in linkbox1 to show all the data in access database table in my texboxes.

But it gives me this error "No value given for one or more required parameters"

Here are my Code. Don't know why it is not working



Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

Dim SqlStr As String
SqlStr = "Select * from tblokkies where luidraad = " & ListBox1.Items(ListBox1.SelectedIndex)

FillTextBox(SqlStr)
End Sub

Public Function FillTextBox(ByVal Sqlstring As String)

Dim OleDbConn As OleDbConnection = New OleDbConnection(ConnString)
OleDbConn.Open()

Dim MyDataReader As OleDbDataReader

Dim MyOleDbCommand As OleDbCommand = New OleDbCommand()
MyOleDbCommand.Connection = (OleDbConn)
MyOleDbCommand.CommandText = Sqlstring

MyDataReader = MyOleDbCommand.ExecuteReader

Try
Do While MyDataReader.Read

TxtLuidraad.Text = (MyDataReader.Item(1))
txtA1.Text = (MyDataReader.Item(2))
txtA2.Text = (MyDataReader.Item(3))
txtA3.Text = (MyDataReader.Item(4))
txtA4.Text = (MyDataReader.Item(5))
txtA5.Text = (MyDataReader.Item(6))
txtA6.Text = (MyDataReader.Item(7))
txtA7.Text = (MyDataReader.Item(8))
txtA8.Text = (MyDataReader.Item(9))
txtA9.Text = (MyDataReader.Item(10))
txtA10.Text = (MyDataReader.Item(11))

Loop

Catch err As System.Exception

MyDataReader.Close()

OleDbConn.Close()
OleDbConn.Dispose()
End Try

End Function
AnswerRe: Listbox to textboxes Pin
Christian Graus17-Mar-09 19:52
protectorChristian Graus17-Mar-09 19:52 
GeneralRe: Listbox to textboxes Pin
hendrikbez17-Mar-09 20:54
hendrikbez17-Mar-09 20:54 
GeneralRe: Listbox to textboxes Pin
celso_cabaleiro17-Mar-09 21:27
celso_cabaleiro17-Mar-09 21:27 
QuestionRe: Listbox to textboxes Pin
hendrikbez17-Mar-09 22:41
hendrikbez17-Mar-09 22:41 
QuestionAutomatically open chat window Pin
Gagan.2017-Mar-09 19:04
Gagan.2017-Mar-09 19:04 
AnswerRe: Automatically open chat window Pin
Christian Graus17-Mar-09 20:04
protectorChristian Graus17-Mar-09 20:04 
GeneralRe: Automatically open chat window Pin
Gagan.2017-Mar-09 20:31
Gagan.2017-Mar-09 20:31 
GeneralRe: Automatically open chat window Pin
Christian Graus17-Mar-09 20:33
protectorChristian Graus17-Mar-09 20:33 
GeneralRe: Automatically open chat window Pin
Gagan.2018-Mar-09 4:47
Gagan.2018-Mar-09 4:47 
Questionrecording sound from mic in VB.NET Pin
shark_scott17-Mar-09 17:34
shark_scott17-Mar-09 17:34 
QuestionPassing hIcons to WinAPI Pin
o m n i17-Mar-09 15:25
o m n i17-Mar-09 15:25 
AnswerRe: Passing hIcons to WinAPI Pin
Dave Kreskowiak18-Mar-09 6:38
mveDave Kreskowiak18-Mar-09 6:38 
QuestionProcessing Very Large Lists Pin
Alan Burkhart17-Mar-09 12:15
Alan Burkhart17-Mar-09 12:15 
AnswerRe: Processing Very Large Lists Pin
Christian Graus17-Mar-09 12:22
protectorChristian Graus17-Mar-09 12:22 
AnswerRe: Processing Very Large Lists Pin
supercat917-Mar-09 12:56
supercat917-Mar-09 12:56 
AnswerRe: Processing Very Large Lists Pin
Alan Burkhart17-Mar-09 13:17
Alan Burkhart17-Mar-09 13:17 
AnswerRe: Processing Very Large Lists Pin
Luc Pattyn17-Mar-09 15:03
sitebuilderLuc Pattyn17-Mar-09 15:03 
GeneralRe: Processing Very Large Lists Pin
Alan Burkhart17-Mar-09 16:18
Alan Burkhart17-Mar-09 16:18 
QuestionMS Word Automation [modified] correct and/or add styles to an existing document using template ???? Pin
Amr M. K.17-Mar-09 12:08
Amr M. K.17-Mar-09 12:08 
Questionunable to get result back from unmanaged code Pin
Bjorn Tore17-Mar-09 11:32
Bjorn Tore17-Mar-09 11:32 
AnswerRe: unable to get result back from unmanaged code Pin
Christian Graus17-Mar-09 11:57
protectorChristian Graus17-Mar-09 11:57 
QuestionRestoring bac the server Pin
jishbalan17-Mar-09 6:35
jishbalan17-Mar-09 6:35 

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.