|
Yup, strange indeed.
Google didn't give me anything useful, but then again I'm not the best at selecting search terms.
Are you using SQL Express?
Regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Yes I am using SQL Express, and vs 2005. Are you using VS 2003? what is the error message you are recieving?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I'm using VS2005 as well. I get the error when I try to open the database in code, and the actual error message is just a simple:
"Cannot open database "<name of="" database="">" requested by the login. The login failed. Login failed for user '<username>'. .Net SqlClient Data Provider"
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Hi,
I am working on a project that use the report generation , can anybody tell me what is the use of "CRAXDRT.REPORT" and what assembly i need to add for this DLL...
T@SU
|
|
|
|
|
tasumisra wrote: I am working on a project that use the report generation , can anybody tell me what is the use of "CRAXDRT.REPORT" and what assembly i need to add for this DLL...
CRAXDRT is Crystal Reports ActiveX designer runtime library. You can find that info on google, or in the documentation.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Is there any way to "follow" a JunctionReparse point using pure C#/.Net 2.0?
I've googled the subject but have been unable to find anything but examples that import some DLL. Importing DLL's to call Windows API's feels like a ugly hack, and I would rather make it work using the tools provided by the .NET Framework (if there is anything in the framework that provides the methods that are required to follow a directory/file which have the FileAttribute.ReparsePoint set)
//Geron
modified on Tuesday, January 22, 2008 7:28:18 AM
|
|
|
|
|
I hate to say this, but you're going to have to resort to using P/Invoke here.
|
|
|
|
|
how wonderfull. Why provide means to detect ReparsePoints but no means to do something like:
<br />
DirectoryInfo rootInfo = new DirectoryInfo("C:\myReparsePoint");<br />
foreach(DirectoryInfo subInfo in rootInfo.GetDirectories())<br />
{<br />
...<br />
}<br />
(the example above will end up with a security exception)
And even better, no means to actually make any sense to the actual target of a ParsePoint when you "find" one....
Ah, well. You dont happen to have a clean example of how to P/Invoke something to find the target of a ReparsePoint?
|
|
|
|
|
I have made some progress with this problem. I'm currently able to retrieve the reparse point target when using a combination of CreateFile and DeviceIoControl (P/Invoke). However the code only works on Windows 2000/2003/XP. When I run the same code under Windows Vista, I dont get a valid file handle when opening the reparse point with CreateFile. I'm suspecting that the security model in Vista is to blame (I'm tryng to find the target of "My Documents\My Videos", which I dont even have access to with my own user in my own documents folder).
|
|
|
|
|
Hi
Im having a .CSV file which is not having header,It has only the records to import to database.
I can able to read the csv file using ODBC, But the resultant Datatable takes the first record as the Header. Always its neglecting the first row.It starts reading from the second row.
How to solve this issue.
Help me out
Thanks in Advance
|
|
|
|
|
Hi there!
Try this:
Add the following criteria to the ODBC connection string, after the datasource.
If there are no headers (as it is with your case): "HDR=NO;"
Otherwise: "HDR=Yes;"
Hope this helps!
modified 11-Apr-12 2:51am.
|
|
|
|
|
thanks.. its working now
i resolved it with oledb by specifiying HDR=NO
|
|
|
|
|
Hi Guys,
The random number in c# using System.Random.NextDouble() is not returning a good set of random numbers over 10000 iterations, there seems to be concentration for a consecutive iterations on set of values, my code looks like this
System.IO.StreamWriter file = new System.IO.StreamWriter("c:\\test.txt");
for (int i=0;i<10000;i++)
{
RandomNumber = new Random();
string lines = "iterationCount"+ ":"+" "+i.ToString()+ " "+RandomNumber.NextDouble().ToString();
file.WriteLine(lines);
//}
}
file.Close();
is there a better way of generatin random numbers in c#?
Many Thanks
happy coding!
|
|
|
|
|
Suj_78 wrote: RandomNumber = new Random();
Put that line outside the loop.
When you create a new Random number generator it is seeded against the current time. If the loop is very short there is no time for the clock to update, so it gets reseeded against the same time as the last iteration, therefore producing the same number again.
|
|
|
|
|
Thanks Colin.
happy coding!
|
|
|
|
|
I'm developing some desktop applications in Visual Studio 2005 and wonder if there are any tools to change colors(gradient) and shapes on controls in a easy way?
|
|
|
|
|
Yes. The user simply changes them in his "Display settings". In case you have never seen this you can find it in the "Display" Icon in "Control Panel"
led mike
|
|
|
|
|
If you want to work with .NET 3.0, then you can easily change gradients and drawing styles of standard windows controls using WPF.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hello...
I make a new control and put it in a new form. How can I detect, if the control is loaded in Visual Studio Designer or directly in Runtime ?
Because if the control is loaded in designer, it shows some stranges behaviour. That's why, I want to cancel it, if the control is in designer.
Thx...
|
|
|
|
|
Hi there
Assuming you're talking about WinForms here: There is a DesignMode property, which can be evaluated. Do note, however, that you cannot use the property in the designer - this is why I usually use OnLoad . Here's a sample, which also plays nicely with controls you're going to extend:
///
/// Inits the base class and registers event listeners.
///
/// <param name="e" />
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!DesignMode)
{
//your internal initialization logic
InitControlInternal();
//the template method below - for extending classes
InitControl();
initControlCompleted = true;
}
}
///
/// An empty template method which is being invoked after the
/// control has been loaded during <see cref="OnLoad">.
///
/// <remarks>The base class does not invoke this method if
/// the control is in design mode.
protected virtual void InitControl()
{
//this method is supposed to be overridden. Initialization of
//the base class itself happens in InitControlInternal
}
HTH,
Philipp
|
|
|
|
|
Hai
I have a mulit line textbox on each time I enter data into it from another text box it should enter data in a new line in the mulitiline textbox
Thanks & Regards
|
|
|
|
|
If the length of the string in the multiline textbox is greater than 0, append the Environment.NewLine and the value from the other textbox.
|
|
|
|
|
Hai
I have two forms opened in my mdiparent form I want to pass the value from textbox of 1st form to textbox of the 2nd form I cannot create a new instance of the 2nd form since I want to send to the same opened instance, I tried by changing the property to public but cannot be acessed with out creating a new instace pls help me to pass the values to the same opened instance of the form
Thanks & Regards
|
|
|
|
|
declare a variable as static ..........if this doenst works take a class declare static variables in it assing the values to the stat variable while u r in first form then use them in next form.......................please dont mind ...make u r question clear
regards
sindhu tiwari
its me sid
|
|
|
|
|
sindhutiwari wrote: declare a variable as static
What if there is more than one instance of the form class?
sindhutiwari wrote: make u r question clear
What about your answer. For the most part it was a clear as mud.
|
|
|
|