|
Having fun guys?, lol
Regards,
Gareth.
|
|
|
|
|
gareth111 wrote: Having fun guys?
No! Wasn't it your day to watch him! :->
led mike
|
|
|
|
|
He needs to check the cells again.
|
|
|
|
|
Ooh, e-mail. Anyone know the address of that bestaility site?
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
Close, but it still doesn't break rules #1, #7, #8 and #10 of the forum guidelines. Better luck next time.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Would you like fries with that?
/ravi
|
|
|
|
|
I have local datasets where I read using the following function. The obj.Read() simply executes a stored procedure which is a select statement. For some reason, for my only dataset where I have 3 tables, the "this.EnforceConstraints = true;" statements fails saying the constratints where not respected (and it seems to happen only in debug, I never had a complain from the staff using the runtime), but this is not true for three reasons : the database is a copy of what the runtime environement uses, it is intermitenet even if the database does not change and the database has the same relations as the local dataset. (see below for the relations)
public void Read()
{
try
{
reading = true;
this.EnforceConstraints = false;
syncTime = DateTime.Now.ToUniversalTime();
foreach (SimpleObjects obj in this.Tables)
{
obj.Read();
}
this.EnforceConstraints = true;
reading = false;
}
catch (Exception e)
{
....code.....
}
}
Relations : (Very simple)
Relations.Add(new DataRelation("MembersToMembersAssociations", Tables["Members"].Columns[0], Tables["MembersAssociations"].Columns[0]));
Relations.Add(new DataRelation("MembersToMembersPhoneNumbers", Tables["Members"].Columns[0], Tables["MembersPhoneNumbers"].Columns[1]));
This is very anoying for I am never sure if I delever a new version if the problem will affcet the runtime, Is it a bug in Visual Studio 2005 (version 8.0.50727)? Did anybody else encounter this problem ?
|
|
|
|
|
I have the following code:
myProcess.StartInfo.FileName = "c:\\Program Files\\Winzip\\wzunzip.exe -o ";
When I try to use the "-o" switch I get an error of "The system cannot find the file specified
". Works fine without the switch.
How can I get this to work?
Working with 1.1.
Thanx for any input.
Jude
|
|
|
|
|
Use Arguments property of ProcessstartInfo class to specify "-o" switch
|
|
|
|
|
I'm working on an FTP client, and using sockets to receive data from a server. When the server sends any data back to the application, I have to wait before the application repsonds. I'd like to starts the transfer for the data in a new thread if possible, leaving the rest of the app free to respond to the user and not just show an hourglass. Is this possible? I'm unsure how to get the data back from the thread.
<br />
Socket socket = openSocket();<br />
SendCommand("MLSD");<br />
if(statusCode != 125 && statusCode != 150) {<br />
LogText = "Error opening connection\n";<br />
return;<br />
}<br />
DateTime timeOutDate = DateTime.Now.AddSeconds(timeOut);<br />
bldBuffer.Remove(0, bldBuffer.Length);<br />
while(DateTime.Now < timeOutDate) {<br />
int bytes = socket.Receive(buffer, buffer.Length, 0);<br />
bldBuffer.Append(Encoding.ASCII.GetString(buffer, 0, bytes));<br />
if(bytes < buffer.Length) {<br />
break;<br />
}<br />
}<br />
socket.Close();<br />
OpenSocket() creates a new socket to the server, and SendCommand() send the specified command over the control connection. The application works, it's just that I have to wait for it to respond.
Thanks for any input.
|
|
|
|
|
Is there some reason you are not using the classes in System.Net namespace that implement the FTP protocol?Echilon wrote: I'd like to starts the transfer for the data in a new thread if possible
Look at the BackgroundWorker or something. It's in the toolbox you can just drop it on your form. There now you are all prepared to do multi-threaded development.
led mike
|
|
|
|
|
I couldn't find performance Explorer in visual studio 2005/2008 Professional. I did search on google they are saying it's in Tool menu but in my version there isn't any. Can somebody help me to locate it. Thanks
|
|
|
|
|
My understanding ( could certainly be wrong ) is that you need a Team edition[^] to get that tool
led mike
|
|
|
|
|
Your understanding is not wrong.
|
|
|
|
|
I was right for once! Did you mark your calendar?
led mike
|
|
|
|
|
led mike wrote: I was right for once! Did you mark your calendar?
Consider it marked.
|
|
|
|
|
If you insist: For the remainder of the year, march fourth will be remembered as the day
led mike got it right...
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I am working on a C# .net application and need a point in the right direction. Or a Shove if you would rather.
This application should allow the users to upload a .pdf file and then insert it into a mySQL database. I really need some help on the objects that I would need to use to get there.
I have used the openfiledialog to browse and find the file but that is all. I am sort of lost at this point.
These .pdf files will be saved in database as blobs.
Any point in the right direction would be greatly appreciated.
|
|
|
|
|
Well there are like thousands of articles and blog entries on the internet, and probably some on this site about storing blobs in databases.
ASP.NET has a control in the Visual Studio Toolbox for uploading files. I would bet like a cup of coffee that Microsoft has hidden some sample code for using it in the documentation of the control, sneaky bastards!
led mike
|
|
|
|
|
I am sure there are a ton of examples of implementing the control but the trick is which control. Which is the best fit for what I am needing to do?
i.e. allow users to browse for a .pdf, then take that .pdf and insert it into a mySQL database.
Is it openfiledialog ???
The answer you gave could work for any question. Go read the documentation is basically all you said.
Thanks!
|
|
|
|
|
Derrick.greer wrote: Is it openfiledialog ???
Well I may be confused at this point. Your first post said:
Derrick.greer wrote: This application should allow the users to upload a .pdf file
"Uploading Files" is generally used to discuss client server file transfer of the file. I therefore assumed you were doing an ASP.NET Web application. So perhaps you could define your project to clear this up?
led mike
|
|
|
|
|
Here is what I would like to do.
1)I would like the application to allow the user to browse for a .pdf file.
2)I would then like to take that selected file and insert it into a mySQL table.
I was able to get the browse functionality working using the OpenfileDialog but i do not know where to go from there. I basically have a path to the file but nothing else.
Sorry for the confusion that my post caused and thank you for your help.
|
|
|
|
|
So this is a Windows Forms application, a desktop application?
Derrick.greer wrote: 2)I would then like to take that selected file and insert it into a mySQL table.
Where is this database? Is it on the same machine? How are database connections created?
As I said in my first post there are tons of database articles right here on CodeProject for storing blobs in Databases.
If it takes more than 3 posts for you to provide adequate information about your project requirements/architecture that pertain to your questions I will have lost all interest in helping you.
led mike
|
|
|
|
|
Derrick.greer wrote: The answer you gave could work for any question. Go read the documentation is basically all you said.
It's generally very good advice. You'd be surprised at how many questions we answer where the poster could have answered it themself with a 2 minute session reading the manuals.
|
|
|
|
|
led mike wrote: sneaky bastards!
yeah, they're like that!
Dave
|
|
|
|