|
Here[^]
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi..,
Check This...
** Declaraion
Public MyConnection As New OdbcConnection
Public MyConString As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=localhost;" & _
"DATABASE=amri;" & _
"UID=root;" & _
"PASSWORD=palm;" & _
"OPTION=3;"
Open Data base.
MyConnection.ConnectionString = (MyConString)
MyConnection.Open()
reply for more Info,,......
Thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Do you anyway to use with ODBCConnection? Because I can not add it to ODBC, MySQL is store on Linux and i use vb.net to connect it.
Thanks
Socheat
|
|
|
|
|
If you were not too lazy to try a simple google search, you'd find there's an entire website dedicated to connecting MySQL to VB, where I'm sure you can find examples of every possible combination you could hope for.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Socheat.Net wrote: Do you anyway to use with ODBCConnection?
Perhaps may sentence readable understand?
Socheat.Net wrote: Because I can not add it to ODBC
ODBC is a database driver, you don't add databases to it.
Socheat.Net wrote: MySQL is store on Linux and i use vb.net to connect it.
Yes? You just got an example on how to connect to a database using ODBC, just change the name from localhost to the name of the server.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Socheat.Net wrote: ODBCConnection
Using ODBC will slow down the application performance as it adds extra layer to the communication (Information from colin). So use MySQLConnector[^], which is ADO.NET library built for communicating with MySQL.
|
|
|
|
|
hi all,
i am creating add-ins in excel 2007 . In my application, i use some form . i want to that if user change the theme/color of excel then this change is also applied on my form.
anybody have idea that how can i perform this task ?
if possible ,then Please provide some code snippet.
thanks
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I have a table's field that "Date". It contains severial data, some are same.
(Eg. 20/11/07
20/11/07
20/11/07
25/12/07
25/12/07
25/12/07
27/12/07
27/12/07
29/12/07
29/12/07
30/12/07
31/12/07 ,etc...)
20/11/07 is 3 data.
25/12/07 is 3 data.
27/12/07 is 2 data.
29/12/07 is 2 data.
30/12/07 is only one data.
31/12/07 is only one data.
I wanna display the above data onto a ComboBox by desending. I wanna collect only one data for a same many data.
(Eg. 31/12/07
30/12/07
29/12/07
27/12/07
25/12/07
20/11/07
... etc )
Please give me some suggestion for above metter.
|
|
|
|
|
You need to check if a value is in the list already before you add it. IF you're getting data from a SQL source, use the UNIQUE keyword to get unique values.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi..,
i am trying to give you 2 suggestion.
1. Try to retrive the unqui date from data base. when you are retriving data from dbase base
user "distinct" keyword in query
Ex: select distinct mydate from mytable.
or
2. use the below logic.
dim innlop,temploop
dim dupflad as boolen=false
combobox1.items.clear
For innlop = 0 To ftp_ds_NT.Tables(0).Rows.Count - 1
dupflad =false
for temploop=0 to combobox1.items.count -1
if ftp_ds_NT.Tables(0).Rows(innlop)(0) )=combobox1.item(temploop)
dupflag=true
end if
next temploop
if dupflag=false then
combobox1.items.add(ftp_ds_NT.Tables(0).Rows(innlop)(0) ))
end if
Next innlop
********* Please Ignore the syntex errors **************
thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
A nested loop is always expensive, and for loops are always nastier to read than for each, but in this case, just combobox1.Items.Contains would work. You could also replace the dupflag variable with a simple continue statement.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi...,
So that i can remove one loop., nice ... , i accepted.
Thanks Christian Graus
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hi! I've converted a vb6 project to vb.net project, I'm using crescent (IIIrd party control)combo box in this project. The problem is sometimes combo boxes do not display data but actually data is there as seen from Immediate window and by displaying through message box. But sometimes combo boxes do not display the data. I'm not sure what the problem could be? I would like to add that same code in vb6 is running perfectly fine. Have any of you come across such a problem. Any help is appreciated.
Thanks
Don't Quit
modified on Tuesday, March 18, 2008 2:43 AM
|
|
|
|
|
Show us the code that do that
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
This would be a question for the manufacturer of the control library, Sax.net[^]. You may also want to find out if they have an updated control library for .NET Framework applications.
|
|
|
|
|
I try to call txtrefno_KeyPress(txtRefNo, e) from form_load event but it throws exception saying "Unable to cast object of type 'System.EventArgs' to type 'System.Windows.Forms.KeyPressEventArgs'."
How do I overcome this problem ?
' Code which throw an exception:
Private Sub frmNewReceipt_Entry_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtrefno_KeyPress(txtRefNo, e) ' this point it throw an exception
End Sub
Private Sub txtrefno_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtRefNo.KeyPress
'' code
End sub
|
|
|
|
|
Try here[^]. I've give you a clue, did you read the error ? Did you look at the definition of the two methods ?
What's the point of calling an event handler for a key press, if you don't specify what key was pressed ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi...,
Very simple.
Your passing wrong arugument to keypresee method.
u have to pass the System.Windows.Forms.KeyPressEventArgs argument instad of System.EventArgs
use this below code and slove your problem.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim temp As System.Windows.Forms.KeyPressEventArgs
Call TextBox1_KeyPress(sender, temp)
End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
MsgBox("Rajesh B --> A Poor Workman Blames His Tools <--")
End Sub
Thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
The big question is, what on earth would you do this for ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
What do you meen????
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
I mean, your answer is right, I just don't get what this could achieve. The point of the keypress event is surely to respond to the key that was pressed. Why does hte OP want to call it, without specifying a key that was pressed ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Dear Christian Graus,
i am sorry .., may be i am going wrong.
The Q. is asked by kalikarr, he wants to call the keypress event in the form load. So before not loading the form he wants to call the event. I think no superman can't enter a value before loading the form. So that i passing a dummy value to that method to fire. however i think that(temp) will also have the value of '0x00'.
replay me.
Thanks.
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
You have totally misunderstood me.
Your answer is fine. I am saying, I don't get what the original poster hopes to achieve with code like this, as the code in a key press event generally checks what key was pressed, in which case it would do nothing, or if he has an action he performs on any key being pressed and wants to perform that same action at startup, he should factor it out into a method. I am saying the person who asked the question has design issues, not criticising your reply.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
i want to navigate backeard and forward in my code window
how to do that with a short key,
hello
|
|
|
|
|
ghumman63 wrote: i want to navigate backeard and forward in my code window
how to do that with a short key,
you can find these shortcuts by going to menu Tools->Options->Environment->KeyBoard, there you will find an edit box having label "Show commands Containing:", there you should type "View.N"(without quotes) then you will find the shortcuts of Navigate Forward and Navigate Backward.
In short you can find shortcut of any menu or you can even customize that.
Regards,
Mushq
|
|
|
|