15,891,409 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by dr.kitanjal (Top 17 by date)
dr.kitanjal
8-Jun-12 5:20am
View
You are genius!!!
dr.kitanjal
13-Jan-12 4:17am
View
Thanks Jagahathan , but is this tool compatible with SQL SERVER 2005 ?
dr.kitanjal
13-Jan-12 3:50am
View
Thanks
I do not want to run query on database to read log.
I only have .ldf file in my pendrive and I want to read that file for extracting the DML operation
dr.kitanjal
19-Dec-11 3:36am
View
Thanks I have received it.
I will review and let you know if any issue come across in my way.
Thanks & Regards
Dr.Kitanjal
dr.kitanjal
19-Dec-11 3:19am
View
Thanks for you help
Here is my email
.........................
Let me know once you send the mail.
dr.kitanjal
19-Dec-11 3:10am
View
Thanks Now I am getting this error
System.InvalidOperationException was unhandled
Message="There is an error in XML document (2, 2)."
Source="System.Xml"
StackTrace:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
at Test.Main(String[] args) in C:\Users\rahul.dhoble\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs:line 62
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.InvalidOperationException
Message="<datatable xmlns=""> was not expected."
Source="cfe6q0aa"
StackTrace:
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDatatable.Read7_Datatable()
InnerException:
Code is as below :
using System;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
[XmlRoot("Datatable"), Serializable]
public class Datatable
{
[XmlElement("Employees")]
public Employees Employees { get; set; }
}
public class Employees
{
[XmlAttribute("Count")]
public int Count { get; set; }
[XmlElement("Employee")]
public Employee Employee { get; set; }
}
public class Employee
{
[XmlAttribute("Code")]
public string Code { get; set; }
[XmlAttribute("Name")]
public string Name { get; set; }
[XmlElement("Address")]
public Address Address { get; set; }
[XmlElement("Contact")]
public Contact Contact { get; set; }
}
public class Address
{
[XmlAttribute("City")]
public string City { get; set; }
[XmlAttribute("Pin")]
public string Pin { get; set; }
[XmlText]
public string AddressValue { get; set; }
}
public class Contact
{
[XmlAttribute("Mob")]
public string Mob { get; set; }
[XmlAttribute("Phone")]
public string Phone { get; set; }
[XmlAttribute("Email")]
public string Email { get; set; }
[XmlText]
public string ContactValue { get; set; }
}
public class Test
{
public static void Main(string[] args)
{
Console.Write("Hi");
XmlSerializer serializer = new XmlSerializer(typeof(Datatable));
FileStream loadStream = new FileStream("sample.xml", FileMode.Open, FileAccess.Read);
Datatable loadedObject = (Datatable)serializer.Deserialize(loadStream);
loadStream.Close();
Console.ReadKey();
}
}
dr.kitanjal
19-Dec-11 0:48am
View
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Serialization;
namespace EMPPRO
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
FileStream loadStream = new FileStream("ep.xml", FileMode.Open, FileAccess.Read);
Datatable loadedObject = (Datatable)serializer.Deserialize(loadStream);
loadStream.Close();
}
}
}
Here is my main class . I am getting below error . Please suggest
Error 2 The name 'serializer' does not exist in the current context
dr.kitanjal
16-Dec-11 4:48am
View
But still here I need to create class of known variable and array and that won't work if my XML node value and attribute changes
Please explain me with some code snippet.
Thanks in advance
dr.kitanjal
16-Dec-11 4:25am
View
What is this ?
dr.kitanjal
16-Dec-11 1:04am
View
But in this case my "EXEC dbname.dbo.spname parameter" is not fixed . It may be any valid SQL query or SP or SP with parameters
dr.kitanjal
15-Dec-11 8:26am
View
But how could I pass @Accountid ?
SELECT * INTO #MyTempTable FROM OPENROWSET('SQLNCLI', 'Server=(local)\SQL2008;Trusted_Connection=yes;',
'EXEC getBusinessLineHistory' + @Accountid )
Result into error
dr.kitanjal
2-Dec-11 6:40am
View
Can you tell which column would specified to be invalid in error ?
dr.kitanjal
2-Dec-11 6:37am
View
Thanks for you help
dr.kitanjal
29-Nov-11 1:03am
View
Thanks . So overall we need to use the third party tool anyway because it couldn't attach files and thrown errors.That's why I need sideway.
dr.kitanjal
28-Nov-11 14:15pm
View
Please learn about full text index and use them
dr.kitanjal
28-Nov-11 14:11pm
View
Can you please let me know how to restore the data updated between 3 am to 3 40 am from .log file ? Thanks in advance
dr.kitanjal
27-Nov-11 13:00pm
View
Thanks Amir , But as a DBA I can not loss 40 min of data . It is very huge database update. Can I recover it from log file (.ldf) file which are present in data folder along with .MDF file ?
Show More