|
Hi
I too doing the same job ..I didn't find any tool for this conversion.
Try to open the VB6 project file with the Visual Studio,it will ask for upgrade option
It will upgrade some code and leaves a message over the code where it fails.
Happy coding..
|
|
|
|
|
We have a system that we want to switch from SQL server to MySql. Is there a simple way to do that. I thought maybe we could just change the connection string in our app.config file but that does not seem to work.
Any and all advice welcome.
Thanks
Tom
|
|
|
|
|
If that doesn't work, you've used SQL that's specific to SQL Server, or you've used the SQL Server specific classes and need to move to the OleDB ones. Hard to know without you telling us what 'does not seem to work', means.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You may find the MySql Connector/Net[^] to be useful. Just replace your SqlClient references with the new references for MySql. And as Christian said in his reply to you, as long as you did not use any SQL Server-specific commands you will be good to go.
|
|
|
|
|
OK.. Pardon my ignorance please.. but what do you mean by replace SqlClient references with the new references for Mysql. Can you give me a example ?
Thanks in advance
Tom
|
|
|
|
|
Sure. This is probably how your code using SQL Server looks:
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim DatabaseConnection As New SqlConnection("connectionstringgoeshere")
DatabaseConnection.Open()
Dim SQLCommand As New SqlCommand("SELECT * FROM TABLE", DatabaseConnection)
SQLCommand.ExecuteNonQuery()
DatabaseConnection.Close()
End Sub
End Class
Now, after you have downloaded and installed the MySql Connector/Net, open the project's properties, click References, click Add, and add C:\Program Files\MySQL\MySQL Connector Net 5.1.6\Binaries\.NET 2.0\MySql.Data.dll. That's the default directory, it may be somewhere else on your computer. Next, change your code to MySql. I bolded the changes:
Imports MySql.Data.MySqlClient
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim DatabaseConnection As New MySqlConnection("connectionstringgoeshere")
DatabaseConnection.Open()
Dim SQLCommand As New MySqlCommand("SELECT * FROM TABLE", DatabaseConnection)
SQLCommand.ExecuteNonQuery()
DatabaseConnection.Close()
End Sub
End Class
Again referring back to what Christian said earlier, as long as you don't do any SQL Server-specific queries you should pretty much be able to just replace the SQL Server stuff with the MySql stuff. Make sure to update your connection string to be for MySql. (You can also use OleDbConnection if you don't want to use the MySql Connector.)
Hope this helps...
|
|
|
|
|
I am using tableadapters built from the data source so I can't just replace the sql server commands with the mysql commands. I guess I thought I should be able to just change the
connectionstring and provider name in my config file and it would go to the MySql database.
Tom
|
|
|
|
|
Hi
I want to open a jpg file from calling with button and the image load with windows picture or somthing else.
please help. tanx!
|
|
|
|
|
Bitmap.FromFile
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
please more explanation with complete code.
thank U
|
|
|
|
|
I see someone posted it. I recommend you read the article I link to in my sig, buy a book on VB.NET and learn some basics so you have a basis on which to understand answers given to you. If you can't work things out based on being told what method to call, you're probably just cutting and pasting code you're given but don't understand, and that's not how to learn.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ViewPictureBox.Image = System.Drawing.Bitmap.FromFile("here is your image path")
|
|
|
|
|
Hello All,
I want to check a simple think in the database ie i want to check the particular data is already in the database or not. Particular table contain only one field and that field is only a primary key. i want to check it with my frond end that is visual studio.net 2008
I write the below code for that
rs.Open("select * from CategoryMaster where categoryname = '"&txtcat.Text &"'", con, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)
If rs.EOF Then
rs.AddNew()
rs.Fields("CategoryName") = txtcat.Text
rs.Update()
txtcat.Text = ""
txtcat.Focus()
Else
MsgBox("This category is Already in database ")
End If
I that code it shown some error in the below line
rs.Fields("CategoryName") = txtcat.Text
The error is Property 'Item' is 'ReadOnly'
Please help me to resolve this
Thanks
|
|
|
|
|
Try: rs.Fields("CategoryName").Value = txtcat.Text .
|
|
|
|
|
Absoulutely. thankyou so much.
|
|
|
|
|
Hi All, I recently developed a shared COM Addin using VB.Net and Outlook 2003. It works great on local machine but when I install it on Terminal server it doesn't work.
My Addin get installed on Windows 2003 Terminal server with the initial Loadbehavior = 2Hex value under the HKEY_LOCAL_MACHINE in registry. It starts working when I change it to 3Hex. But as soon as another user logs in on termail server and starts outlook, the loadbehavior values becomes 2Hex again and my Addin stops working for all users.
Any idea why registry is being changed by multiple user sessions. I will appreciate your response.
Thanks
|
|
|
|
|
Hiii Expert
I m also working on outlook 2003 add ins using vb.net 2005. and i am facing same problem but i solved my problem following these steps (MSDN Article).
http:
May be this helps you.
Thanx
Mitesh Khatri
|
|
|
|
|
Hey Mitresh, Many thanks for your response. My Addin is a Shared Addin not VSTO one, do you think these steps are same for shared addin?
Nas
|
|
|
|
|
Hi, I did follow the article but still same problem. I guess this article addresses VSTO Addins not Shared COM Addins. Just for the test purpose, I created a small shared COM addin for outlook 2003. After installation it worked fine but as soon 2 users started outlook session (on Terminal server), it stoped working and again Registry Loadbehavior value changed to 2 from 3. This thing is driving me crazy. Does anyone guide me where I am wrong?
Thanks
|
|
|
|
|
Hiii
I also develop excel 2007 Shared add ins and when i run multiple instance of excel then my add in not working properly on same machine. i think add ins working on single instance of a application.
Thanx
Mitesh Khatri
|
|
|
|
|
So it memans we cannot run COM Addin on terminal server?
|
|
|
|
|
Hiii
May be we r unable to run COM Addin on terminal server? but not sure.....
If you get any solution of this problem plz send me at mail id.
Thanx
Mitesh
Khatrimitesh@hotmail.com
|
|
|
|
|
|
I am working with access database and vb.net. I like to make two listBox in a form. first for product list and second for suppliers list of those corresponding products. When I click product list item corresponding suppliers of that product should be show in supplier list.Data retrive from products and suppliers table from database. I am a begainer of programming. Please help me to design the code.
modified on Tuesday, June 24, 2008 5:26 AM
|
|
|
|
|
What's your actual problem?
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|