Click here to Skip to main content
15,896,726 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: storing images in database for dating site. Pin
Steve Pullan8-Mar-06 18:45
Steve Pullan8-Mar-06 18:45 
AnswerRe: storing images in database for dating site. Pin
Steve Pullan8-Mar-06 18:53
Steve Pullan8-Mar-06 18:53 
GeneralRe: storing images in database for dating site. Pin
uglyeyes9-Mar-06 1:24
uglyeyes9-Mar-06 1:24 
GeneralRe: storing images in database for dating site. Pin
Steve Pullan9-Mar-06 11:09
Steve Pullan9-Mar-06 11:09 
GeneralRe: storing images in database for dating site. Pin
uglyeyes9-Mar-06 17:03
uglyeyes9-Mar-06 17:03 
Questionhow to clear datagridview w/c is data-bound Pin
thepityone8-Mar-06 17:52
thepityone8-Mar-06 17:52 
AnswerRe: how to clear datagridview w/c is data-bound Pin
abhinish8-Mar-06 18:11
abhinish8-Mar-06 18:11 
QuestionVB.NET / MS Access Threading Issue... Pin
mayhem_rules8-Mar-06 17:51
mayhem_rules8-Mar-06 17:51 
I am running a procedure in a thread which is created on the click of a button. However, the process does not complete correctly. Please refer to the code below:

Private Sub cmdProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdProcess.Click
Try
Dim tquery As Thread
tquery = New Thread(AddressOf Me.GetData)
tquery.Start()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error In cmdProcess_Click", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub GetData()
Try
Dim field1, field2, op1, period1, value1 As String
Dim m1, y1, tablename As String

period1 = Trim(cmbPeriod.Text)
m1 = Mid(Trim(period1), 5, 2)
y1 = Mid(Trim(period1), 3, 2)
tablename = "SSA" & m1 & y1

field1 = Trim(cmbField1.Text)
value1 = Trim(cmbValue.Text)
op1 = Trim(cmbOP1.Text)
field2 = Trim(cmbField2.Text)

str = "select " & Trim(op1) & "(" & Trim(field2) & ") from " & Trim(tablename) & " group by " & Trim(field1) & " order by " & Trim(field1)
ipcon.Open()
DA = New OleDbDataAdapter(str, ipcon)
DS = New DataSet
DA.Fill(DS, "qrec")
ipcon.Close()
DataGrid1.SetDataBinding(DS, "qrec")
Catch ex As Exception
MessageBox.Show(ex.Message, "Error In GetData", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

-- This code exits with the following error message 'Controls created on one thread cannot be parented to a control on a different thread'
Please guide me how to resolve this issue.

With Best Regards,

Mayur
QuestionIssue on the List Items Collection Editor Class Pin
KaKa'8-Mar-06 15:19
KaKa'8-Mar-06 15:19 
AnswerRe: loan payment Pin
Steve Pullan8-Mar-06 15:32
Steve Pullan8-Mar-06 15:32 
GeneralRe: loan payment Pin
Garth J Lancaster8-Mar-06 15:39
professionalGarth J Lancaster8-Mar-06 15:39 
GeneralRe: loan payment Pin
Tank528-Mar-06 16:06
Tank528-Mar-06 16:06 
GeneralRe: loan payment Pin
Tank528-Mar-06 16:09
Tank528-Mar-06 16:09 
GeneralRe: loan payment Pin
nzmike8-Mar-06 16:18
nzmike8-Mar-06 16:18 
GeneralRe: loan payment Pin
Tank528-Mar-06 16:22
Tank528-Mar-06 16:22 
GeneralRe: loan payment Pin
progload8-Mar-06 16:30
progload8-Mar-06 16:30 
Questionhow to import Bookmarks favorites file to TreeView Pin
segaal8-Mar-06 13:41
segaal8-Mar-06 13:41 
AnswerRe: how to import Bookmarks favorites file to TreeView Pin
segaal11-Mar-06 6:51
segaal11-Mar-06 6:51 
QuestionHow to reference checkedlistbox from one class to another Pin
JK11508-Mar-06 12:24
JK11508-Mar-06 12:24 
QuestionScrolling datagrid without scrollbar visible - possible? Pin
nzmike8-Mar-06 11:51
nzmike8-Mar-06 11:51 
QuestionIssue with manual adding data to Checked list box Pin
devarajchandra8-Mar-06 9:54
devarajchandra8-Mar-06 9:54 
QuestionExecution speed - question re: vb.net Pin
guruvar28-Mar-06 9:53
guruvar28-Mar-06 9:53 
AnswerRe: Execution speed - question re: vb.net Pin
Steve Pullan8-Mar-06 11:38
Steve Pullan8-Mar-06 11:38 
GeneralRe: Execution speed - question re: vb.net Pin
guruvar28-Mar-06 11:45
guruvar28-Mar-06 11:45 
AnswerRe: Execution speed - question re: vb.net Pin
Garth J Lancaster8-Mar-06 15:37
professionalGarth J Lancaster8-Mar-06 15:37 

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.