|
|
You could also try using the System.BitConverter class.
Kev
|
|
|
|
|
I need to write a console app that will allow me to get files out of SourceSafe. I can not make a reference to the type lib in the project. SO far all the samples with VSS use early binding. I have been able to get the late binding to work with Excel, but I am not getting very far with VSS. Anyone out there using Late Binding with VSS and C#? The reason I need to do late binding is I need to support version 5 and 6 of SS. If there is another way to ensure I can work with different versions of SS I am open to any suggestions.
|
|
|
|
|
how to upload a directory and save it to oracle database using C#
|
|
|
|
|
I'm not sure I understand what you're trying to do completely, but it sounds like you're saying you want to store a directory's worth of files in Oracle. Is that correct?
If so, it should be pretty straightforward. You'll want to iterate over the files in the folder (and possibly recurse over any subfolders), then for each file you encounter, read it into a stream, then write the stream to BLOB data in Oracle using a command and parameter(s). For reference, you may want to read up on the System.IO.FileStream class, the managed Oracle data client types, etc.
This is a high level answer because the question was equally non-specific. If you have more detailed questions, I'll be happy to try to help. I've done some of this in the past.
Things you may want to consider are:
1. Is file size a concern?
2. Do you care what the file extension is?
3. How do you want to identify files in the data record (name only, source path and name, etc)?
4. Are file permissions an issue when reading files or extracting them from the database?
Hope this helps.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hi all,
Are there any third-party components for custom form designer for PC
(can be called by C#.NET), so the end users can create their own custom forms for data collection ?
Thanks
Patrick
|
|
|
|
|
I have created a simple Windows Froms app with about 20 or so controls. I would like to be able to store a snapshot of the control values in a preset file at any time, and recall the preset (again at any time during execution) in order to repopulate the controls. Rather than creating my own serializable class with member variables that correspond to each of the control values and manually getting and setting the control values during saving and recalling, it was suggested that I create a DataSet and bind the control values to the items in the DataSet. I managed to successfully create an xml schema and DataSet and add it to the designer so I could bind at design time, but have decided to bind manually in code (it turned out to be a pain to have to go back and re-bind every control in the designer as a result of making a change to the table and having to re-add the DataSet). In any case, the binding seems to work just fine when binding the Value property of my home-grown numeric edit control to an int or double field in a table of my DataSet, but I am not able to bind the Checked property of a radio button to a boolean field in the same table. In other words, this works…
this.ctrlStartTimeNumEdit.DataBindings.Add("Value", newDataSet1.ModelSettings, "StartTime");
This doesn’t…
this.ctrlFileCreationRBtn.DataBindings.Add("Checked", newDataSet1.ModelSettings, "FileCreation");
If it helps, I am creating my preset files using...
newDataSet1.WriteXml(filename);
and reading the preset file using...
newDataSet1.Clear();<br />
newDataSet1.ReadXml(filename);
I don't ever need more than one row of data (hence the call to Clear() before calling ReadXml()). I'm still not even convinced that the DataSet and data binding are worth the trouble for this application. At some point I will be using the values of most of the controls in function calls or equations and I still don't know the best way to programmatically get at the control values (from the individual controls themselves or the DataSet).
Thanks for your help - Any suggestions would be greatly appreciated.
|
|
|
|
|
Hi Newbie_T,
Hope this link will help you on binding Radiobutton control.
http://msdn.microsoft.com/msdnmag/issues/04/07/AdvancedBasics/default.aspx
Thanks
SGS
|
|
|
|
|
I already have this assembly that creates a proxy dynamically for my webservices..
the thing is, when you use WSE in a webservice as a webreference in VStudio.net, autmatically it creates two service names for every service name like this:
MyWebservice/MyService AND
MyWebservice/MyServiceWse <-- this one has methods such as service.RequestSoapContext.Security..whatever
then, when i create the proxy as new dynamic assembly it will only retreive the MyWebservice/MyService and it won't create the Wse ServiceName.. where does VStudio.Net retreives the Wse Service name from.. the proxy generator i have, uses System.Reflection to retreive webservice info such as webmethods, parameters and parameter types.. and yes, i actually added the Microsoft.Web.Services2.dll as a reference for dynamically compile the Proxys assemblies, and it wont bring the Wse service name either...
does ne1 know where do i get the MyServiceWse from??? Reflection doesn't seem to bring it up..
|
|
|
|
|
Hi everybody.
What is the C++.Net equivalent for C# base keyword?
Do I need to cast this to the base type?
Thanks,
Yaakov
|
|
|
|
|
this IS the base type (by default), and the contents of the base class are always visible, assuming they are visible at all ( not private ).
There are C++ and managed C++ forums, which may have been a better choice for this question. I assume C++.Net == MC++.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
|
__super ? Is that standard C++ ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
|
Yeah, that's what I thought, but I've been too long in C# land to be sure.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Maybe I didn't explain mesylf clearly.
I have a managed class C with a virtual method M .
Now I derive D from C , and overrides M .
How can I invoke C.M() from D.M() (or from any other D method)?
In C#, this is possible with the base keyword. What is the equivalent for MC++?
Sorry for asking it here, but the MC++ forum seems to be dead. I ask you, as the most part of us do write some C++ from time to time.
Thanks,
Yaakov
|
|
|
|
|
|
Thanks. That solved the problem.
I didn't realize that I can use the static-like syntax for instance members.
Yaakov
|
|
|
|
|
I have a server application that uses alot of memory. I have had to set the IMAGE_FILE_LARGE_ADDRESS_AWARE bit because I need that much memory. And still it seems that I have read, that .NET can't handle proccesses that take more than 2.2 GB of MEM. And it seems to be right, the process crashes every time it reaches that level. Since I can't use more mem, I need to make sure that the proccess doesn't reserve too much memory that it isn't using.
They way it works now is that it reserves alot of mem because there is alot availabe and the GC doesnt free any, it only removes unreferenced objects but keeps the memory reserved.
I have read that Windows sends an memory resource notification that can cause a procces to dump unused reserved memory. And I can read on MSDN how to use CreateMemoryResourceNotification in C++. But this is C# ;=)
Can someone plz help me make sure my process doesn't hog up more mem than it actually needs?
Thx Qualen
|
|
|
|
|
Comon I know there is alot of wizards on this board. Could anyone please help.
Thx Qualen.
|
|
|
|
|
Interop.
<br />
[System.Runtime.InteropServices.DllImport("KERNEL32.DLL", EntryPoint="CreateMemoryResourceNotification")]<br />
public static extern IntPtr CreateMemoryResourceNotification(int notificationType);<br />
That'll give you access to the function.
Interesting, I've never read that .NET can't use more than 2.2gb of RAM. Can't be good. Hopefully they'll fix it for .NET 2.0. At least get it up to 4gb.
|
|
|
|
|
one thing that i dont like about .net is the GC!
i am not a newbie programmer and i can dispose my objects when i think that i wont need them anymore!
and the worst thing that they dont recommend to call dispose() and they advise to rely on the internal mechanism of GC!
i am sure that i can do the job better than GC
i love programming
|
|
|
|
|
Hello:
I have a web page that is sending a MS-Word file to be showed.
Code I’m using is:
Response.ClearContent();
Response.ClearHeaders();
Response.Clear();
Response.ContentType = "application/msword";
Response.Charset = "";
Response.AddHeader("Content-disposition", "inline; filename=ExportPath");
Response.AddHeader("Content-Length", sFileLength);
Response.WriteFile(ExportPath);
Response.Flush();
Response.Close();
System.IO.File.Delete(ExportPath);
If file to display was not MS-Word neither MS-Excel, as a PDF file, then dialog box is not showed.
How can I in MS files to such dialog not be showed?
A.L.
El hombre que tiene amigos debe mostrarse amigo...
|
|
|
|
|
1) Your question actually belongs in the ASP.NET[^] forum. I'll answer anyway.
2) I'm afraid I don't understand you. Are you saying that when you download a Word document to the client browser you want it displayed directly like a PDF does if you have a viewer installed? You have no control over that. You can trick the client into showing a "Save as" dialog box by sending "application/octet-stream" for any file type, since that's perceived as a binary file. Whether or not Word - or any other application - displays directly in the Active Document container (i.e., Internet Explorer) is up to the client configuration.
For example, if a PDF viewer like Acrobat was not installed, you would be prompted to save. Depending on Word settings, a Word document will either open the browser or prompt to save. Even Acrobat has a setting that controls whether it's hosted in the Active Document container or opened in a separate windows application.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Thanks you for your reply.
Excuse me if I was not clear enough.
I want when I display a word document (into IE) document being dispalyed directly without a dialog box asking user if he desieres to open / save this document. Similarly as happens with PDF documents.
You wrote that using "application/octet-stream" is possible do "trick" client being able to display document directly.
I tried it and don't work.
I hope you'll have some idea about it.
El hombre que tiene amigos debe mostrarse amigo...
|
|
|
|