|
Standard question #2:
What error message do you get?
---
b { font-weight: normal; }
|
|
|
|
|
70's live! wrote: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Have you installed the driver?
---
b { font-weight: normal; }
|
|
|
|
|
yes i installed the driver n its configured in the odbc administrator. when testin it from odbc administrator test is ok.
|
|
|
|
|
i dunno how to convert vb.net to vb6.....any idea?..
|
|
|
|
|
Why would you want to??
This is going to be a VERY difficult task. VB.NET (the .NET Framework) encapsulates functionality in standard classes that you would have to rewrite from scratch in VB6. There is no conversion tool. Basically, you'd be rewriting the ENTIRE app from scratch.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
LifeIsSad wrote: I need help...pls help....
A better subject line would be helpful to would be helpers. For example: "Convert between VB.NET and VB6" would be a better subject line.
|
|
|
|
|
You probably can't, and why would you want to ? Any non trivial program is likely to use libraries that are not in VB6.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Anyone know how to multi-select from a TreeView with VB.NET 2003 ?
Need help~! Thanks.
|
|
|
|
|
You can't. It's not supported...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi there, you can try to create an array for each node in the treeview you have selected, and just change the back colour or use a different icon to indicate the selected nodes. You should be able to do that with a litle bit of codeing.
A programmer's life is good... or is it?? Ek dink nie so nie!
|
|
|
|
|
I found a TreeViewMS control with sample code that support multi-selection of treeview. It is kinda cool.
Thanks anyways.
|
|
|
|
|
|
What's this got to do with VB.NET?? *.LIB files are only good for C/C++ code.
But, since you asked... It's part of the Platform SDK[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I would like to know how to dynamically create a query in an Access database using ADO.Net. I did this using DAO's CreateQueryDef. But I dont want to use DAO in my project. I would like to how this can be achieved in ADO.Net using VB.net or C#.
Thanks for your replies n Awaiting them.
Regards,
Hari.
Hari Prasad...
|
|
|
|
|
|
Hi all...
i'm a bit confuse in VB.NET. Actually i want to upload the webform that i've done in VB.NET to internet. So can we do like that in VB.NET?
Can we also create our own address name (www.....) for the webform?
if yes can someone please help me..
Thanks..
areon25
|
|
|
|
|
These are not programming tasks. What you need to do is set up a server that is visible to the web, and also if you want a www.xxx.com address, you need to register it and set it up to point to the IP address of your online machine. Or you can just get a web hosting company to do it for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I wanted to know how to populate a form once you have done a search on a record. What I am trying to do is that when I search for a record in the access database, once it finds the record I want it to go to another form where I have textboxes and it should populate the information in that form. The search is on a different form, so I have to switch between forms. If anybody can guide me on the right track I will appreciate it.
|
|
|
|
|
I don't do alot of database interaction but I think I can help you with the interaction between the two forms. You will need to create a Public object reference from Form2 to Form1. Below is a short VB.NET sample that copies the text from a TextBox1 in Form1 to a TextBox2 in Form2. This sample will assume that you have already created two forms named: Form1 and Form2.
In Form2, insert the following code right below the initial class/inherits declaration:
Public Class Form2
Inherits System.Windows.Forms.Form
'Insert this code
Public myObject as Object
Now save the changes to Form2.
One thing you may or may not know is that when Objects are passed to one another, the receiving object does not get a copy of the the passing object, it gets the memory reference to it! That is great news for us. We will now create code to pass Form1's object reference to Form2.
Go to Form1 and it's code view. I will assume that you are showing Form2 by clicking a button of some sort, therefore I will use the sample name Button1.
Private Sub Button1_Click(..) Handles Button1.Click
'sample form2 declaration
Dim pForm2 as new Form2
' here's where the object reference is passed!
' Me is the command for the current form
pForm2.myObject = Me
pForm2.Show
End Sub
The two forms are now linked based on the object reference. Now to illustrate this, create a textbox in each of the forms. (TextBox1 in Form1 and TextBox2 in Form2) Also, add a button to: FORM2.
Form2 will be sending the text from TextBox2 to TextBox1. In Form2's designer mode double click on the newly created Button1 to open the code view and .net will automatically create the click handler sub. In that click handler, insert the following code:
Private Sub Button1_Click(..) Handles Button1.Click
'Note: This button1 code should be in form2 not form1!
'this the code. "Ctype" is casting an unknown object
'to a known object aka. Form1
CType(myObject, Form1).Textbox1.Text = Textbox2.Text
End Sub
There you go! Now run the program and test the code. Form2's textbox should send text to Form1's textbox. You should be able to go from there. Good Luck!
Richard Blythe
|
|
|
|
|
will this work if I have a search textbox in form2 and when I hit the search button on form2 it should go to the database and pull that record out and display all the information on form1 filling in all the textboxes on form1. Please let me know. Thanks for all your help so far.
|
|
|
|
|
I took a class in database interaction but I my memory on that topic is foggy. Here is some simple code that will search through an employee table for the first name and update form1 accordingly.
This code will assume that you have linked your textboxes in Form1 to the database. It also assumes the you have created the object reference mentioned in the last email. In form2, create the two following items: a button named btnSearch and a textbox named Textbox1. Below is click handler for btnSearch:
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
With CType(myObject, Form1)
' create a boolean var
Dim blnFoundMatch As Boolean
'initialize a for loop to search all records (if necessary)
For intX As Integer = 0 To .DsEmployees1.tblEmployees.Count - 1
'See if the current fldFirstName = Textbox1's text
If .DsEmployees1.tblEmployees.Item(intX).fldFirstName = TextBox1.Text Then
blnFoundMatch = True
'update form1 with the contents of row num: intX
.BindingContext(.DsEmployees1, "tblEmployees").Position = intX
Exit For
End If
Next
If blnFoundMatch = False Then
MessageBox.Show("No match was found on " & TextBox1.Text, "No Match",
MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show(TextBox1.Text & " was found and form1 has been updated.", "MatchFound", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End With
End Sub
Hope this helps you. I'll be leaving on a business trip after tommorrow but feel free to write anytime.
Richard
|
|
|
|
|
I tried your suggestion and for some reason I am not able to get information to the other form. Is there anyway you can write me a small program, so I can have a visual presentation of what you are talking about. I would really appreciate that. Please let me know. Thanks
|
|
|
|
|
The simplest way I have found to communicate between classes (aka forms) is with public PO Boxes in a module. I'm not sure what form you data is taking after being extracted from the database, but, for example, a string object can be passed between forms with a string PO Box. The PO Box may look like this:
Module M_Common
Public strPOBox01 As String
End Module
In the form that extracts the data from the database, place the text needed by the second form in the PO Box thusly:
strPOBox01 = myTextData
In the form that populates the controls, extract the text from the PO Box just as simply:
myTextBox.Text = strPOBox01
You can see more complex examples of this technique in this article where entire records are being exchanged via one PO Box.
George
|
|
|
|
|
I tried your suggestion, but with no luck. I was not able to get the information to the other form. I have a search textbox on form2 and when I hit the search button on form2 it should find that record and bring up form1 where there are textboxes and datetimepicker that should be updated automatically according to the record information and I am unable to do that. Any ideas
|
|
|
|
|
You've posted exactly the same comment and question in response to two very different responses to your original question. Which suggestion did you try? If you tried the other person's idea, I can't help you. If you tried my suggestion, did you first read the article I referenced in my first response? The demo project in that article provides a couple examples of passing entire records back and forth between forms using a technique that has been proven over and over to work.
|
|
|
|