Click here to Skip to main content
16,005,209 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Runtime error '91' Pin
nlarson1124-Sep-08 6:09
nlarson1124-Sep-08 6:09 
GeneralRe: Runtime error '91' Pin
Dave Kreskowiak24-Sep-08 9:12
mveDave Kreskowiak24-Sep-08 9:12 
GeneralRe: Runtime error '91' Pin
nlarson1124-Sep-08 10:03
nlarson1124-Sep-08 10:03 
GeneralRe: Runtime error '91' Pin
ChandraRam25-Sep-08 1:06
ChandraRam25-Sep-08 1:06 
AnswerRe: Runtime error '91' (Done!) Pin
Pedram Behroozi25-Sep-08 3:50
Pedram Behroozi25-Sep-08 3:50 
QuestionProblem With Saving Image in Binary format Pin
Saba0223-Sep-08 16:35
Saba0223-Sep-08 16:35 
AnswerRe: Problem With Saving Image in Binary format Pin
N a v a n e e t h23-Sep-08 17:48
N a v a n e e t h23-Sep-08 17:48 
QuestionAccess combobox binding and relationships Pin
Member 435504923-Sep-08 11:48
Member 435504923-Sep-08 11:48 
It's been a few days and I have not been able to figure out my mistake. I have 2 combo boxes I want the two combo1 as the parent and combo2 to be the child.

Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpen.Click

Dim strProvider As String = "Microsoft.Jet.OLEDB.4.0"
Dim strConnect As String
Dim cnn As OleDbConnection
Dim cmd As OleDbCommand
Dim odr As OleDbDataReader
Dim da1 As OleDbDataAdapter
Dim da2 As OleDbDataAdapter

' Connect to unsecured Access database
strConnect = String.Format("Provider={0};Data Source={1};", strProvider, txtPath.Text)

'Initialize the DataSet object
Dim ds As New DataSet()

'Create Command object
Dim cmd1 As String = "SELECT * FROM ER"
Dim cmd2 As String = "SELECT * FROM Thickness"

Try
' Retrieve and open a connection.
cnn = New OleDbConnection(strConnect)
cnn.Open()

'Initialize the DataAdapter object and set the SelectCommand property
da1 = New OleDbDataAdapter(cmd1, cnn)
da2 = New OleDbDataAdapter(cmd2, cnn)

'Populate the DataSet
da1.Fill(ds, "ER")
da2.Fill(ds, "Thickness")

' Define the relationship between the tables.
ds.Relations.Add(New DataRelation( _
relationName:="relERThickness", _
parentColumn:=ds.Tables("ER").Columns("ER_ID"), _
childColumn:=ds.Tables("Thickness").Columns("ER_ID"), _
createConstraints:=False))

'Bind the DataTable to the ComboBox
ComboBox1.DataSource = ds
ComboBox1.DisplayMember = "ER"

'Bind the DataTable to the ComboBox
ComboBox2.DataSource = ds
ComboBox2.DisplayMember = "ER.relERThickness"

Catch exp As Exception
MsgBox(exp.Message)

Finally
If Not odr Is Nothing Then
odr.Close()
End If

If Not cmd Is Nothing Then
da1.Dispose()
da2.Dispose()
End If

If Not cnn Is Nothing Then
cnn.Dispose()
End If
End Try
End Sub
QuestionHow to GetMethod that use Dynamic Parameter (TypeParam)? Pin
f3rland23-Sep-08 11:01
f3rland23-Sep-08 11:01 
QuestionError: "Invalid Parameter Used" when i try to display an image [modified] Pin
Member 367504723-Sep-08 3:37
Member 367504723-Sep-08 3:37 
QuestionPLEASE HELP ME Pin
sidwithu23-Sep-08 3:31
sidwithu23-Sep-08 3:31 
AnswerRe: PLEASE HELP ME Pin
Dave Kreskowiak23-Sep-08 7:02
mveDave Kreskowiak23-Sep-08 7:02 
QuestionReport Printining Pin
Gagan.2023-Sep-08 1:13
Gagan.2023-Sep-08 1:13 
QuestionConvert Topographic Map/ Contour Map Pin
Tan Yih Sheng22-Sep-08 23:45
Tan Yih Sheng22-Sep-08 23:45 
Questioncreating ascii file in mc1000 Pin
jayv0122-Sep-08 22:28
jayv0122-Sep-08 22:28 
AnswerRe: creating ascii file in mc1000 Pin
ChandraRam23-Sep-08 0:54
ChandraRam23-Sep-08 0:54 
GeneralRe: creating ascii file in mc1000 Pin
jayv0123-Sep-08 11:25
jayv0123-Sep-08 11:25 
QuestionWebBrowser Drag/Drop Support? Pin
Saul Johnson22-Sep-08 21:12
Saul Johnson22-Sep-08 21:12 
AnswerRe: WebBrowser Drag/Drop Support? Pin
jzonthemtn23-Sep-08 0:26
jzonthemtn23-Sep-08 0:26 
GeneralRe: WebBrowser Drag/Drop Support? Pin
Saul Johnson24-Sep-08 20:47
Saul Johnson24-Sep-08 20:47 
GeneralRe: WebBrowser Drag/Drop Support? Pin
albertjian18-Mar-10 22:32
albertjian18-Mar-10 22:32 
Questionhow to list the datas in combobox or listbox? Pin
dileep.arangod22-Sep-08 20:54
dileep.arangod22-Sep-08 20:54 
AnswerRe: how to list the datas in combobox or listbox? Pin
Ashfield22-Sep-08 21:11
Ashfield22-Sep-08 21:11 
GeneralRe: how to list the datas in combobox or listbox? Pin
dileep.arangod23-Sep-08 1:18
dileep.arangod23-Sep-08 1:18 
GeneralRe: how to list the datas in combobox or listbox? Pin
Ashfield23-Sep-08 1:37
Ashfield23-Sep-08 1: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.