|
See if it works.
In the Load event of the control, try to set the width and height if the control.
Regards,
Arun Kumar.A
|
|
|
|
|
Hi,
Im trying to connect to a mysql server, the connection detials are below:
("Network Address=ip:3306"
+ "Initial Catalog='db1';"
+ "Persist Security Info=no;"
+ "User Name='login';"
+ "Password='pass'");
The problem is it complains that the first piece of the string isnt correcty formed. Any ideas?
Regards,
Gareth.
|
|
|
|
|
I don't use MySQL myself but just looking at your string there are three comments:
1) shouldn't "Network Address=ip:3306" be something like "Network Address=127.0.0.1:3306"
2) you use the ";" as a seperator but it's missing from the first aurument.
3) you've got quote marks "'" around most of the arguments except the first.
This would give the first line the following format:
("Network Address='127.0.0.1:3306';"
Just an idea..
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
I found this page which lists different connection strings dependant on the API (driver) you use:
http://www.connectionstrings.com/?carrier=mysql
I don't know if it helps?
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
Hi Wayne,
Thanks for the website, looks very helpful.
Though, i have a new problem now.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Any ideas?
Regards,
Gareth.
|
|
|
|
|
Hi,
When i try to type in a textbox while running a project in VS 2005 i get the below error, any ideas what this means?, im guessing its a env setting in vs i need to change, but what?
LoaderLock was detected
Message: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
Regards,
Gareth.
|
|
|
|
|
|
Cheers, that fixed it.
Regards,
Gareth.
|
|
|
|
|
I want to write a little program that would convert any specific string into a mysql hash password. I can do this thru mysql itself, however I want to implimenent with C#. it Mysql I would just do Password('string') and that would give me 5569C9CAE94A5E43CD192F9F6AD2A1C171D5465F, How can I do this with C#?
|
|
|
|
|
What hashing algorithm does the MySQL function use?
The System.Security.Cryptography namespace contains providers for calculating MD5, MD160, SHA1, SHA256, SHA384 and SHA512 hash codes.
---
single minded; short sighted; long gone;
|
|
|
|
|
I'm not sure how to use this md5 hash. Can you give me a sample code to hash a basic string "string"?
|
|
|
|
|
|
im working on a editor that uses RichTextBox, and as a added feature, im using a syntax highliter from here -> http://www.codeproject.com/cs/miscctrl/SyntaxHighlighting.asp?df=100&forumid=185470[^]
I downloaded the source and editted the form1.cs with like this:
shtb.FilterAutoComplete = true;
and i compiled the source and when i tested my App, the autocomplete feature isnt working...
I even tried to download his demo project and tried to use autocomplete and it didnt work. Where im i going wrong... can someone help me please ~
|
|
|
|
|
Use the forum at the bottom of the article to ask for help with article thingys
led mike
|
|
|
|
|
It's as if he given up support on the project, i went thuru all of the coments first, someone actually reported this problem and no one (including the author) replied, so i thought i'd ask at the main board where the smart people hang out >_>;
Anyone actually has a useful answer? this is one last feature i need implementing in my editor, any help would be much appreciated...
|
|
|
|
|
Check the function CompleteWord() in the file SyntaxHighlightingTextBox.cs - you need to press CTRL and SPACE whilst typing a word,
it works me - if does not work for you put a breakpoint on the WndProc(ref Message m) function
for the case Win32.WM_KEYDOWN: and see why it's not being shown
Note: I did convert this into a Visual Studio 2005 solution but I presume that this should still work in 2003?
Mark.
|
|
|
|
|
Beautiful stuff mate, i honestly didnt know abt Ctrl + Space to bring up the autocomplete box.
This works so well, im glad i posted this question here. Thanks allot again ^_^;
|
|
|
|
|
I am designing a Windows Application. In the Settings class of this Application the user has to set a Directory Path to a Software program. I created a browsing button With the "FolderBrowserDialog" and with "FolderBrowserDialog.SelectedPath" I show this selected path in a textbox.
Now this works, but the "FolderBrowserDialog.SelectedPath" is not remembered by the application when I restart it.
How can can I store this SelectedPath? ( I also need this path as a string variable in other Classes)
|
|
|
|
|
|
Sorry but your link gave me an internal blackout... I just started programming in Visual C# using the Visual Studio manual. Sofar everything was clear, but I got stucked in how to handle my application settings. In the manual I found in the ApplicationSettingsBase this example for saving settings:
<br />
private void Form1_FormClosing(object sender, FormClosingEventArgs e)<br />
{<br />
frmSettings1.FormText = this.Text + '.';<br />
frmSettings1.Save();<br />
so my questions are:
1. Are the ApplicationSettingsBase commands the way to store and reload application settings?
2. If yes: is this applicable to the problem/question in my first message?
3. where should i put this code?
|
|
|
|
|
Make sure you use the same instance of FolderBrowserDialog in order the remember the settings. (A member variable or something like that)
|
|
|
|
|
hi,..
im doing some task that convert vb.net code into c#.net code...so there having some method..like...
Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
// code running..
........
End Function
..........................................................
Partial Class <myclass>
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler
..............................................................
Public Shared Function GetInfoByDate(ByVal Id As Integer,
ByVal ToDate As Date,
Optional ByVal MaxRows As Integer=0)As SqlDataReader
// code running..
........
End Function
are their any c# code definitions or any sample plz supply me.
thanks in advance....
|
|
|
|
|
ASysSolvers wrote: Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
// code running..
........
End Function
In C#:
public GetCallbackResult()
{
}
Remember that the interface is defined at the top of the class
public class MyClass : System.Web.UI.ICallbackEventHandler
{
}
ASysSolvers wrote: Partial Class
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler
partial class MyClassName : System.Web.UI.Page, System.Web.UI.ICallbackEventHandler
{
}
ASysSolvers wrote: Public Shared Function GetInfoByDate(ByVal Id As Integer,
ByVal ToDate As Date,
Optional ByVal MaxRows As Integer=0)As SqlDataReader
// code running..
........
End Function
C# doesn't support optional parameters like VB does. You have to create overloaded methods like this:
public static SqlDataReader GetInfoByDate(int Id, DateTime ToDate)
{
GetInfoByDate(Id, ToDate, 0);
}
public static SqlDataReader (int Id, DateTime Date, int MaxRows)
{
}
Does this help?
|
|
|
|
|
Beat me by 5 minutes!
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Scott Dorman wrote: Beat me by 5 minutes!
Well, it did take a while to put the post together.
|
|
|
|