|
I've used XSLT to handle this type of situation quite effectively in the past. The beauty with XSLT is that you can do things like use template matching to achieve what your trying to do with !!LOOPNAME!! and the likes.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hello
Can any body tell in detail what is relative virtual addressing and all its basics?
Why virtual addressing is needed? How RVA invlolves in execution of PE files(EXEs,DLLs and so on..)
Regards
Muhammad Usman Khalil
|
|
|
|
|
This is far to broad a question for these forums, I suggest you try Google and find some articles on computer hardware which will explain it. In terms of executing programs the programmer does not, in general, need to know the detail as the operating system manages it automatically.
[edit]I note you have also posted this question in the C++ forum; please post in one forum only.
This is also similar to other questions you have asked in the past; you should have learned how to use Google for yourself by now.[/edit]
MVP 2010 - are they mad?
|
|
|
|
|
thnx for mentioning..
this was posted here mistakenly..
thus i removed this one by myself after posting it to C++ forums.
Secondly I am googling and for saking good help posting here as well
Next time will question different and distinctly
Regards
Usman
|
|
|
|
|
Relative Virtual Addressing is addressing memory by it's offset relative to the base locastion.
This allows you to load a dll at a new base location (memory address) without breaking everything.
It is used in the PE file layout - see this article[^] for some background.
|
|
|
|
|
i couldnt delete a particular row from datagridview using binding navigator delete button.it deletes another id.not d selected row.whatz d solution
|
|
|
|
|
Are you using a SqlDataAdapter to fill the BindingSource? How does the DeleteCommand[^] look? Can you post it here?
I are Troll
|
|
|
|
|
yup.um using a SqlDataAdapter.
string sql = "select id,name,contact,meal_num,cost,due from info";
SqlDataAdapter da = new SqlDataAdapter(sql, con.objConn);
DataTable data_table = new DataTable();
da.Fill(data_table);
dataGridView2.DataSource = data_table;
BindingSource bindingSource = new BindingSource(data_table,null);
dataGridView2.DataSource = bindingSource;
bindingNavigator1.BindingSource = bindingSource;
dataGridView2.Columns[0].Visible = false;
string s = "delete from info where id='" + dataGridView2.CurrentRow.Cells[0].Value + "'";
try
{
SqlCommand sqlCmd = new SqlCommand(s, con.objConn);
con.objConn.Close();
con.objConn.Open();
sqlCmd.ExecuteNonQuery();
con.objConn.Close();
// return true;
}
catch (Exception e5)
{
con.objConn.Close();
// return false;
}
i solved d problem using another button.problem occurs only when i want to delete using d delete button of d binding navigator.
|
|
|
|
|
i want to fix headr of my gridview fix,i have searched many solutions but the problem is ,i need to get work in ie,firefox and opera.solutions are on the internet but i could not find a solution that work in three browsers.
Thank you in advance
|
|
|
|
|
The app was compiled for the .net framework 3.5. I have other tester of the app that live within the US, but my only european test is having trouble opening the app. He says when he double clicks the app it doesn't do anything. Not even an error. It simply doesn't opne. He has the right framework installed, and running Vista. I have searched far and wide for an answer. Do, I need to set the application properties to compile for a specific machine?
|
|
|
|
|
Hi,
it sounds like your app is failing early on and not producing anything. Maybe there is an uncatched exception in the constructor of the main form.
here is some advice:
- always include code to log your internal events to a text file, which the customer can mail to you for inspection.
- log the start time, the OS version, and whatever may be relevant before your app starts;
- make sure you catch all exceptions; when you got one, log it (using ToString, not just Message) and deal with it or throw it again, but don't just ignore it.
- test your app on all relevant Windows versions at your place, don't ship it for a version you haven't tested yourself.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Since this is Vista, you may want to trying running the app with the "run as administrator" property set to true.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
how i can install window application with sql database
|
|
|
|
|
|
I don't know how to initialize parameters to call method of COM object via COMObjectVariable.GetType().InvokeMember(..,parameters,.).
COM object is inherited from IDispatch interface and definition of calling method in IDL is:
[id(0x0000201c), helpstring("Returns the Dimensions collection object for the referenced object."), helpcontext(0x00007553)]
void GetDimensions(
[out] long* NumDimensions,
[in, out] SAFEARRAY(IDispatch*)* Dimensions);
My code in C# is:
object COMObjVar=...; //assign instance of COM IDispatch object to variable COMObjVar
object[] Params=new object[2];
int NumDimensions=0;
Array Dimensions=Array.CreateInstance(typeof(object),0);
ParameterModifier[] Modifiers=new ParameterModifier(2);
Modifiers[0]=new ParameterModifier(1);
Modifiers[0][0]=true;
Modifiers[1]=new ParameterModifier(1);
Modifiers[1][0]=true;
COMObjVar.GetType().InvokeMember("GetDimensions",BindingFlags.InvokeMethod, null, COMObjVar, Params, Modifiers, null, null); //throw TargetInvocationException with Inner COM exception "Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"
When i call method COMObject.GetType().InvokeMember(...) program throw TargetInvocationException with Inner COM exception "Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))".
How to initialize method parameters correct?
Thanks.
|
|
|
|
|
You have also to set some parameters.
In your case you wrote
object[] Params=new object[2];
but I can't find something like
Params[0] = NumDimensions; or
Params[1] = Dimensions; .
Actually you call this function without a valid parameter.
Greetings
Covean
|
|
|
|
|
Sorry, I just forgot to type in.
Corrected code is:
object COMObjVar=...; //assign instance of COM IDispatch object to variable COMObjVar
object[] Params=new object[2];
int NumDimensions=0;
Array Dimensions=Array.CreateInstance(typeof(object),0);
Params[0]=NumDimensions;
Params[1]=Dimensions;
ParameterModifier[] Modifiers=new ParameterModifier(2);
Modifiers[0]=new ParameterModifier(1);
Modifiers[0][0]=true;
Modifiers[1]=new ParameterModifier(1);
Modifiers[1][0]=true;
COMObjVar.GetType().InvokeMember("GetDimensions",BindingFlags.InvokeMethod, null, COMObjVar, Params, Modifiers, null, null); //throw TargetInvocationException with Inner COM exception "Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"
|
|
|
|
|
I never worked with ParameterModifier but if I take a look at the example in MSDN and on your code there is a difference that can explain the problem:
So try this:
ParameterModifier p = new ParameterModifier(2);
p[0] = true;
p[1] = true;
ParameterModifier[] mods = { p };
COMObjVar.GetType().InvokeMember(..., mods, ...);
Hope this helps.
Greetings
Covean
|
|
|
|
|
I tried it and it works.
Thanks.
|
|
|
|
|
sir i want to save the data from windows application to ms access my code is:
OleDbConnection conn = new OleDbConnection();
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\siddharth.mdb";
OleDbDataAdapter da = new OleDbDataAdapter("select * from table1", conn);
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);
DataSet ds = new DataSet();
da.Fill(ds);
DataRow dr = ds.Tables[0].NewRow();
dr["id"] = textBox1.Text;
dr["name1"] = textBox2.Text;
dr["phone_no"] = textBox3.Text;
ds.Tables[0].Rows.Add(dr);
da.Update(ds);
MessageBox.Show("Data has been inserted successfully", "MESSAGE", MessageBoxButtons.OK, MessageBoxIcon.Information);
but i m unly see the data at the run time not permanently so sir plz help me.............
--
siddharth
|
|
|
|
|
OleDbCommandBuilder would generate the Insert, Delete and Update commands when you have set the SelectCommand for the OleDbDataAdapter. Here you have not done that.
Set the SelectCommand for the adapter to your select statement and it should work.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
|
|
|
|
|
Hi All,
I am trying to load a XAML string and convert it into a FlowDocument object as follows:
return XamlXmlReader.Load(new XmlTextReader(new StringReader(xaml))) as FlowDocument;
It seems that the Load function has not been implemented (yet?) in the Beta 2 of Framework 4. According to all documentation that I can find it should be there, or at least XamlReader.Load
How can I convert a XAML string to a FlowDocument otherwise ?
Thanks
OD
|
|
|
|
|
I eventually managed to solve my problem; it turned out to be a namespace problem.
The XamlXmlReader and XamlReader classes I tried using existed in the System.Xaml namespace.
I should have used the classes in the System.Windows.Markup namespace.
The solution thus was:
return System.Windows.Markup.XamlReader.Load(new XmlTextReader(new StringReader(xaml))) as FlowDocument;
Works like a charm !
OD
|
|
|
|
|
Hi!
I have installed an 'old and rusted' version of Visual Studio 2003, with comes with base .NET Framework 1. I have some questions...
Can I install and use .Net Framework 2 and 3 with Visual Studio 2003? What files do I have to dounload and install? Just the standard 'redistributable packs'?
Can all of tree been simultaneously installed?
Do I have to use some directive or somehow config Visual Studio to use one or other version? Or all thre convive / overlap simultaneously?
What will I have access to? I supponse classes, controls, funcionalities (like Generics)? Will some new controls appear automatically on my toolbar, or I will have to manually regiser?
Sorry for so many inquiries... and thanks in advance for your replies!
|
|
|
|
|
VS 2003 supported only the .NET Framework 1.1. Although you can install other versions of the framework side by side, you can't use them in VS2003.
I know the language. I've read a book. - _Madmatt
|
|
|
|