|
Thanx buddy,
but i have still some issue..
I have created the table call XMLTest into database
in which I have two fields
PKID-Integer datatype
Data-XML datatype
While storing the xml data into database whether I have to put the line
<?xml version=""1.0"" encoding=""utf-8"">
at start of the data
or not ?
|
|
|
|
|
It doesn't matter. Have you at least tried it before asking?
only two letters away from being an asset
|
|
|
|
|
Hi...
I have try it
I have store the data into databse in following format...
(orignal data in file)
<mydata>
<employeename>aaa
<age>21
I store the following data using this code
dim xmldata = <mydata><employeename>aaa_ <age>21
SqlConnection.Open()
Dim cmd As New SqlCommand("insert into xmlTest Values(62,'" & xmldata & "')", SqlConnection)
cmd.ExecuteNonQuery()
MessageBox.Show("Record Saved Succsessfully")
SqlConnection.Close()
it stores sucsessfully
but after executing the following query I get the this data...
Select * from xmlTest for xml auto
I get this data after firing the query on that row of SQL server
<xmltest pkid="62">
<mydata>
<employeename>aaa
<age>11
befor going to ask about retriving the data first tell me
whether I am storing the data in right format or not ?
|
|
|
|
|
Hi...
I have try it
I have store the data into databse in following format...
(orignal data in file)
<xml version="1.0" encoding="utf-8">
<MyData>
<EmployeeName>aaa</EmployeeName>
<age>21</age>
</MyData>
I store the following data using this code
dim xmldata = <?xml version="1.0" encoding="utf-8">_
<MyData><EmployeeName>aaa</EmployeeName><age>21</age></MyData>
SqlConnection.Open()
Dim cmd As New SqlCommand("insert into xmlTest Values(62,'" & xmldata & "')", SqlConnection)
cmd.ExecuteNonQuery()
MessageBox.Show("Record Saved Succsessfully")
SqlConnection.Close()
it stores sucsessfully
but after executing the following query I get the this data...
Select * from xmlTest for xml auto
I get this data after firing the query on that row of SQL server
<xmlTest PKID="62"> <-------------------------------table name and PKID
<data> <-------------------------------Column Name of Table
<MyData>
<EmployeeName>aaa</EmployeeName>
<age>11</age>
</MyData>
</data>
</xmlTest>
befor going to ask about retriving the data first tell me
whether I am storing the data in right format or not ?
|
|
|
|
|
Hi ,
I am new in .NET technology...
I have a XML file containing following data...
<?xml version="1.0" encoding="utf-8">
<MyData>
<EmployeeName>aaa</EmployeeName>
<age>25</age>
</MyData>
Now,I want to simply store this into databse(SQL server 2005)
and I want to retrive same data and bind to grid...
How can I do this ?
|
|
|
|
|
My objective is to get the answer from up to 6000 Urls in the shortest time. It was working very well (12 seconds for 5200 LAN Addresses) until some delay started to happen.
My code uses up to 20 simultaneous HttpWebRequest.BeginGetResponse with ThreadPool.RegisterWaitForSingleObject for timeout handling.
However some (up to 4 in 5,000) of the requests never hit the TimeoutCallback function with the second parameter (timedOut) true, and they waste 5 minutes of my precious time until they hit theBeginGetResponseCallback function and then raise a WebException. The exceptions says something like "the operation reached the time limit", but as the exception message is in portuguese(my native language) I couldn't Google it.
I wonder if I can reduce this time limit to 20 seconds for example. Anyone knows how? I've already tried:
<system.web>
<httpRuntime executionTimeout="20"/>
</system.web>
But as I'm running it as a Console Application, ASP.NET configurations don't work. And I also tried:
myHttpWebRequest.Timeout = 20*1000;
And
ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), AsyncState, 20*1000, true);
Without success. Can you help me?
What I am trying to say is there are 4 possible results for an asynchronous HTTP request:
1) Never reach the callback function -> timeout callback function
2) Reaches and answers sucessfully
3) Reaches and raises an exception
4) Delay exactly 5 minutes until raise an "time limit" web exception inside the callback function
The 4th possibility is the one is driving me nuts
|
|
|
|
|
MSDN[^] documentation says [assembly: AssemblyVersion("1.1.*.0")] is valid
However, when I try this I get a compiler error; 'The version specified '1.1.*.0' is invalid'
Does anyone understand what's going on here?
only two letters away from being an asset
|
|
|
|
|
Yes. You were looking at the .NET 1.1 documentation. It changed post 1.1, as detailed here[^].
|
|
|
|
|
Missed that. Thanks, that explains it but it seems a bit odd to remove the functionality.
only two letters away from being an asset
|
|
|
|
|
|
Gosh. You found the smiley's. Is your lesson tomorrow, how to stand up without drooling?
|
|
|
|
|
Hi there,
I plan to create a menu interface program for CD/DVD that uses classes from .NET Framework 2.0. There are some powerful classes in .NET that I want to use instead of creating them by myself to reduce the developing time.
This menu program should be started automatically when the user inserts the CD/DVD in the drive. This is done by using the AutoRun technology in Windows. The problem is that if .NET Framework 2.0 is not installed in the computer this program can not be started. Then the user must first install .NET Framework 2.0 before the program can be run. Well, this is a common problem to all .NET programs and normally maybe this is not a big problem, but this program is supposed to show a menu interface immediately, and, I guess most users expect that, always...
I know that Windows Vista always have .NET Framework 2.0 installed and I guess most Windows XP users today also have it. But I have never found any statistics about this.
Does anybody know an Internet site that have statistics about how many people that uses .NET Framework 2.0, and the other versions of .NET Framework? Does Microsoft have some statistics?
/Mika
|
|
|
|
|
I would still say that you'd be crazy to assume everyone has .NET. Just write a bootstrapper that installs it from your CD.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes. I will of course check if NET Framework is installed, as the first thing I do, and start an installation if not. But I am just worried it will take a very long time. NET Framework is big and people expects a menu appear immediately.
But I have to do some tests and see how long time it will take. And see how the user experience is if they need to wait long time before the menu appears.
|
|
|
|
|
The only thing that can really be assumed: All Windows Vista and above OS will have at least .NET 3.0. Unfortunately, Microsoft has not pushed .NET 2.0 or .NET 3.0 to older systems through either Windows Updates or Service Packs.
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 Blog
|
|
|
|
|
It would be interesting to know how many percent of for example the Windows XP users really have NET 2.0 installed, but there are maybe no official statistics here to read. But I guess the number of people having NET 2.0 or above is increasing very fast, because more and more program uses it and installs it. And in Vista it is always included (as part of 3.0).
|
|
|
|
|
Hello all, I have some wierdness.
using the very simple code below:
EventLog el = new EventLog("Security");
foreach (EventLogEntry elr in el.Entries)
{
Trace.WriteLine(elr.Message);
}
results with the following message:
The description for Event ID '4647' in Source 'Microsoft-Windows-Security-Auditing' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'S-1-5-21-51003140-4199384537-3980697693-500', 'Administrator', '26L2233A1-06', '0x86377'
As far as I can tell, it's like the .net framework can't find the source dll to resolve the message. I pulled out some old C++ code that did some event log processing and ran it on the same machine and sure enough I couldn't find the message DLL.
I know that Microsoft changed the event log API in vista/2008 but I thought the new API was backwards compatible.
Backwards compatible or not, I need to be able to read the security log on vista/2008.
Any ideas?
thanks,
Gene
|
|
|
|
|
Can you read other logs? Application, System, DNS, FRS etc?
There isn't an API (in the Win32 SDK function sense) to read the text details from the event logs. Your C++ code is probably reading the MessageFile setting from the appropriate place in the registry, and doing a Loadlibrary / FormatMessage dance.
That won't work on Vista / 2K8. The message DLLs are referenced in a different way (look at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers). If the .NET framework only uses the "old" way, you'll have to roll your own.
|
|
|
|
|
Thank you Graham,
I can read the application log correctly but that's probably because they are registering their message dlls in the old NT way instead of the new vista way.
I found the key that you reference, but couldn't find the "GUID" in the event log entry so I couldn't figure out the correct message dll to do the load/format message.
I couldn't find any documentation on all this mess; can you point me some?
thank you again,
gene
|
|
|
|
|
Getting further, maybe the problem is that thre isn't a key for "Microsoft-Windows-Security-Auditing" in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels
hive.
I guess I could just enumerate the all the publishers values and look for the value "Microsoft-Windows-Security-Auditing" to get the message dll name.
I'll try that next. 
|
|
|
|
|
well...I'm getting closer but I can't figure out how to get a "real" event ID for the security log.
for example,
Here is a sample event in C#:
EntryType SuccessAudit
EventID 0x00001210
Source "Microsoft-Windows-Security-Auditing"
now, I've figured out that the REAL event ID that the Vista Event API wants is -1342172656 or 0xB0001210, so the piece that I'm missing is the 0xB000???? path.
according to this http://msdn.microsoft.com/en-us/library/aa385646(VS.85).aspx it says that I'm suppose to shift the EntryType left by 30 but the EVENTLOG_AUDIT_SUCCESS is 8 so shifting it 30 bits slides it right off the DWORD.
Does anyone know how to turn a EventLogEntry into a Message DLL ID? I THINK it's all related that I can't figure out the facility and severity correct.
thank you for any help,
Gene
|
|
|
|
|
How can I be sure that an assembly is CLS-compliant?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Do you mean, apart from checking if it's got the CLSCompliant(true) attribute?
Regards,
Lev
|
|
|
|
|
Yes. FXCOP says I should use the attribute if the assembly is CLSCompliant, but how do I know if it is?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I think you have two options:
1. Add the [assembly:CLSCompliant(true)] attribute to the assembly, and see what are the compiler's errors/warnings
2. Or if you need to do it in code, look at the CLS compliance restrictions in the ECMA 335 standard[^] (it's got a lot of info on CLS compliance) and check for these using Microsoft.Cci (the fxcop's backend) or Mono.Cecil
Regards,
Lev
|
|
|
|