|
I don't know why, but copying the dll (MySql.Data.dll) to the location of the application did the trick.
I'll apreciate an explaination...
Thanks again.
|
|
|
|
|
If you just want to use MySql.Data.dll, you can set "CopyLocal = true" in reference property. Then the MySql.Data.dll will be copied automatically to Debug or Release directory. You can distribute it. To connect to remote DB, then what you need is connectionstrings.
|
|
|
|
|
hw can i suspend and resume thread.
|
|
|
|
|
From MSDN : "Thread.Suspend has been deprecated. Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources. http://go.microsoft.com/fwlink/?linkid=14202"
http://msdn.microsoft.com/en-us/library/ms173179.aspx[^]
|
|
|
|
|
Hi
I have a client requirement that we need to implement paging in sharepoint document library.
For instance in some cases document library contain 100 or more files in such cases we need to implement paging.
Can any one suggest any solution that can be implemented easily using jquery or server side code.
Any help in this case will be appreciated.
|
|
|
|
|
Don't spam the forums looking for an answer. This is clearly a SharePoint related question that should not have been asked here.
only two letters away from being an asset
|
|
|
|
|
Hi All,
I have an application (Win Forms) that amongst other things downloads files from a server. This is done with the use of a mapped network drive.
The problem is sometimes the network drive will have a red cross (vista) to show it is not connected, it simply takes the user to double-click the desired path in order for it to connect. But if I try to access it through code while it is 'not connected' then it fails. All it takes is the user to double-click the drive and then the application will work again fine. But I don't want users to have to do this.
Basically, I want to know if there is a way I can check the connection status, and if need be, attempt to connect the drive before accessing the files. I don't want to un-map/re-map the drive each time either.
Thanks for any suggestions
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Could you not:
if (!File.Exists("DriveLetter:\PathToSomeFileOnMappedDrive"))
{
Refresh the mapping here
}
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks for your reply,
I get how to test is I can access it but I do not know how to ask it to try to connect.
I don't want to have to un-map the drive and re-map because that seems messy and will probably result in user-rights issues for some of my users
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
This[^] has a zRestoreDrive method that would appear to do what you require.
It is a more recent version of Map Network Drive (API)[^] from here on Code Project.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks, I'll take a look
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Not supported in vista and later[^]
But it's given me something to search for, was getting no where before so thanks for that. I'll post if I get an answer
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
isn't MSDN great? they tell you the function is gone, but don't point you to a solution...
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
I know, I really was expected to get somewhere from that. Well maybe I can use this as an excuse to stop my users having Vista!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
musefan wrote: Well maybe I can use this as an excuse to stop my users having Vista!
One needs an excuse?
|
|
|
|
|
hi,
i doing one stanalone application in that i am crearing a login control in this i am checking the name and pssw which stored in the data base if the name and passw present in data base then user get login else error mssg
i tried some here but when i run my prog. it shows runtime exception that connection not open need help
here is my code
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private OleDbCommand cmd;
private void Form1_Load(object sender, EventArgs e)
{
String connectionString = "Provider= Microsoft.Jet.OLEDB.4.0; Data Source= C:\\Login1.mdb; username=xxx;password=xxx;database=login1";
OleDbConnection connection = new OleDbConnection(connectionString);
connection.Open();
string selectString =
"SELECT Name, Password " +
"FROM login1 " +
"WHERE Name = '" + login.Text + "' AND Password = '" + psw.Text + "'";
cmd = new OleDbCommand(selectString, connection);
connection.Open();
String strResult = String.Empty;
if (strResult.Length > 0)
{
label5.Text = "YOU ARE LOGGED IN!";
}
else
{
label5.Text = "INCORRECT USER/PASS!";
}
connection.Close();
|
|
|
|
|
the exception holds file name, class name, method name and line number information.
And an IDE (such as Visual Studio[^] can be told to always show line numbers in editor windows.
Hence it is easy to spot where things go wrong; now read the error/exception message carefully, and check your code. Which I didn't read as it isn't properly formatted using PRE tags.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Could you provide the error detail.. I think some other issues are there....
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
There are so many things wrong with this! For example:
Mangesh Tomar wrote: connection.Open();
string selectString =
"SELECT Name, Password " +
"FROM login1 " +
"WHERE Name = '" + login.Text + "' AND Password = '" + psw.Text + "'";
cmd = new OleDbCommand(selectString, connection);
connection.Open();
Why try to open it twice?
Mangesh Tomar wrote: String strResult = String.Empty;
if (strResult.Length > 0)
{
label5.Text = "YOU ARE LOGGED IN!";
}
What do you think is going to happen? Magic?
I sugest you go right back to the begining - create a new project, connect to that database and read a single record from the table. When you get that working, start building up from there.
Oh, and Luc is right - preserve your formatting with <pre> and </pre> tags around you original code when you post it here. It make it easier to read, and thus more likely to be read. (And Luc is one of the people you really want to read your code - you will probably never learn half the stuff he has forgotten...)
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hello.
Does anybody know, I'm searching for control, that can be created Icon automatically in taskbar, for example for showing network speed.
I just have an idea to create it manually, using Bitmap class, but I must draw it pixel for pixel. (For example: 100M)
Are there any easier way ?
Thanks.
|
|
|
|
|
hi guy,
you want show different icons in the systemtray for some actions that nobody knows. how can we make this dynamic without snipping with the finger ^^ you understand ^^
make your bitmaps with paint.. or some else and load it at runtime.
greetz
|
|
|
|
|
Dynamically created Icon for "Number" in Taskbar
Just 0...9
|
|
|
|
|
load bitmaps ^^
or draw the 0..9 to a bitmap from string then create the icon and show it ^^
|
|
|
|
|
Hi,
this draws into a bitmap:
Bitmap bm=new Bitmap(100,100);
Graphics g=Graphics.FromImage(bm);
g.FillRectangle(...);
g.DrawString(....);
and this turns a bitmap file into a simple icon file:
string filename=...;
try {
Bitmap bm=(Bitmap)Image.FromFile(filename);
if(bm.Width!=32 || bm.Height!=32) {
bm=new Bitmap(bm, 32, 32);
}
Icon icon=Icon.FromHandle(bm.GetHicon());
bm.Dispose();
string filename2=Path.ChangeExtension(filename, ".ico");
Stream stream=new FileStream(filename2, FileMode.Create);
icon.Save(stream);
log("Created icon "+filename2);
} catch(Exception exc) {
log("Failed to create icon from "+filename);
log(exc.ToString());
}
If all you need is a few different icons, run such code once and save the result as files or resources.
:)
<div class="ForumSig">Luc Pattyn
<hr>I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
<hr>Local announcement (Antwerp region): Lange Wapper? Neen!
<hr></div>
|
|
|
|
|
i have the following code
this code runs on LogIn form Acts as standby while other forms still opened
if(Application.OpenForms["MainForm"].MdiChildren.Length>0)
{
MessageBox.Show("!..you should close all opened windows before continue", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
Application.Exit();
}
when code running LogIn form disappeared and user can access any opened form
i want to only keep LogIn form running untill entering valid password
|
|
|
|