|
according to them (just phoned) they are and anything not in their specification is ignored. wooohooo. that just saved me hours of typing thanks
|
|
|
|
|
wookie wrote:
the receiver is not using .net and i'm not really sure how they are dissecting this xml document.
If you're not sure, then leave it in. It will actually HELP the receiver to decode the document because your supplying the specific XML version and encoding information. Leaving this out can cause problems between differing systems. Supplying too much information, in this case, is a good thing!
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok - in it stays.... thanks!
|
|
|
|
|
can i convert a field to checkbox in sql reporting service report how?
|
|
|
|
|
I need to import data from a DBase file in my C# application, but I'm not familiar with the .NET database stuff - can anyone point me in the direction of an article or some sample code?
|
|
|
|
|
Through
System.Data.ODBC namespace.
You could download it from Microsoft. Not sure it they had incorporated it into VS.NET or not.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
please visit this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbc_part_2.asp
Sreejith S S Nair
|
|
|
|
|
I've got the ODBC namespace, but I don't know what provider string to give when opening the connection to access a DBase file, and then how to actually access the data once I've opened it. There are plenty of examples for SQL, Oracle etc. but nothing specifically for the old DBase/FoxPro format.
|
|
|
|
|
ADO.NET is an abstraction layer. While various databases and other files that have OLE DB providers support different things, the basic things should be supported.
If you're not familiar with ADO.NEt, I suggest you read about it first. See Accessing Data with ADO.NEt[^] in the .NET Framework SDK.
Also, the ODBC ADO.NET provider (in the System.Data.Odbc namespace) is included in .NET 1.1 which means it's part of Visual Studio .NET 2003. It was only a beta in .NET 1.0. Same goes for the OracleClient . The SqlClient and OleDb namespaces have been available since .NET 1.0.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
If you have VB6. You can try in your IDE using the ADO object to connect to ODBC via connection string. Through the wizard provided by VB6. You could get the needed connection string. I am sure that there are easier way to do it which probably just a matter of few search in the net. The format are standard by the way, you should be able to figure it out. Sorry that I could not think it out off the hand.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Thanks for your help - I've sorted out the connection string ("Provider=Microsoft dBase Driver (*.dbf)};DSN=<filename>"), but I'm now stuck on the SQL string when I try to create the reader object - it should be something like "SELECT * from " but there doesn't appear to be a table name in the .dbf file. I've tried things like "SELECT * from *" but it doesn't like it. Any ideas?
|
|
|
|
|
How do you open a file for example an XML file in coding? I tried "File.Open(Path including filename,FileMode.Open,FileAccess.Read)" but it does not seem to work. Am I missing something?
Sweet
|
|
|
|
|
I usually go for something like this:-
XmlTextReader reader = new XmlTextReader(file)
and then read it with:-
while (!reader.EOF)
{
if(reader.NodeType == XmlNodeType.Element)
{
switch (reader.Name)
{
case "AnInterestingNode":
// do stuff
break;
}
}
reader.Read() // advances the reader
}
The only thing to look out for is if you use reader.ReadOuterXML(); in a case statemant as this advances the reader, and the 'reader.Read();' call means you will miss a node. (This very thing has me scratching my head for about an hour!)
|
|
|
|
|
Ok what I want to do is open the file like you would normally double click on it in a directory. Is it possible?
Sweet
|
|
|
|
|
you mean open a file in a supporting application eg Notepad and a .txt file?
if so
Process.Start("Notepad.exe", "C:\\temp.txt");
If environment variable 'path' doesn't complete the app path you will have to give it in full.
|
|
|
|
|
So i think you know how to get a required file and file name.
//pass your file name as parameter
//use this code below to open your file like normal double clicking.
System.Diagnostics.Process.Start("filename")
Sreejith S S Nair
|
|
|
|
|
I tried the following
try
{
DirectoryInfo dirInfo = Directory.GetParent("C:\\Club");
FileInfo[] Files = dirInfo.GetFiles("*.xml");
MessageBox.Show(Files[0].ToString());
Process.Start(Files[0].ToString());
}
catch(Exception Error)
{
MessageBox.Show(Error.Message);
}
and
I recieve the following error "The system cannot find the file specified"
Sweet
|
|
|
|
|
_Hacker wrote:
MessageBox.Show(Files[0].ToString());
Process.Start(Files[0].ToString());
I bet the MessageBox didn't show the FULL path to the file you tried to open, did it?
The following code changes will work because the code will no longer assume a default directory with using just Files[]:
try
{
String parentPath = Directory.GetParent("C:\\Club");
String fullFilePath;
DirectoryInfo dirInfo = New DirectoryInfo(parentPath);
FileInfo[] Files = dirInfo.GetFiles("*.xml");
fullFilePath = Path.Combine(parentPath, Files[0]);
MessageBox.Show(fullFilePath);
Process.Start(fullFilePath);
}
catch(Exception Error)
{
MessageBox.Show(Error.Message);
}
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you all... It works!
Sweet
|
|
|
|
|
Hi,
I'am developing an image viewer in which i got an image inside a picture box.On top of the image i'am drawing a rectangle.But once delete the rectangle drawn on the image the mouse pointer is getting arrested to the boundaries of the image.This problem comes when i delete the image using the context menu...The code i use 4 it is given below...
foreach (Shape s in SelectedShapes)
{
Shapes.Remove(s);
}
SelectedShapes.Clear();//Clear the arraylist
Invalidate();
This is not happening when i'am deleting the shape using the keyboard.But what is confusing me is that i have clled the same code as given above inside that also..The only diff is 'am checking whether the key press is DELETE or not.
This problem also gets solved when i click once on the image after deleting the shape ..
Kindly help me
MMX
|
|
|
|
|
Make sure you're not setting the Cursor.Clip static property, as this clips (confines) the cursor's region in which to move around.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Arrested?!
For what?
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I was thinking of writing a tunneling program much like that of Ytunnel for yahoo. Nothing public other than I might post the code on here upon completion. In any event, I am not that experienced with protocols and proxys in the form of programming. Other than reading through the sdk is there any specific pages one could point me to to get a head start on making a proxy server or tunneling? I'm open for collaboration as well. I have only been coding in c# for around 4 months or better now so I figured this would be a great project. Just looking for some help on how to go about doing it.
Thanks for your reply
Win32newb
"Programming is like sex, make one mistake and you have to support it for a long time"
|
|
|
|
|
i don't have much idea about your requirement . anyhow see the link
http://www.codeproject.com/internet/httptunneling.asp
you can use our search option to find article.
give keyword like
tunneling or proxy server.
Sreejith S S Nair
|
|
|
|
|
C# really isn't suited for this. Packet mangling is a low-level operation and requires optimal performance. A managed environment really isn't suited for this.
There are many tunneling programs - including secure ones like ssh - which already do the job and do it well. ssh, for example, is written by experienced cryptographers and developers and is supported by the community and several companies.
Microsoft MVP, Visual C#
My Articles
|
|
|
|