|
Hi,
I am currently working on a web application (which written in ASP.NET) that requires to submit a message to AS400 system via MQ.
I managed to establish the MQ connection and able to send the message to the MQ request Queue. All the submission I have done so far is submitting a message which containing only english character (alphabets) and it works successfully. But I want also to submit a message which is combination of Traditional Chinese and English characters. How do I passing this message over to MQ and what is the necessary settings that need to be done at my code in order to make sure my message can be interpreted correctly when it received by the other end. Do I need to set codepage at my code? If yes, where do I set it?
Anyone experience in message passing between dot net application and IBM WebSphere MQ and appreciate your help. Thanks.
Regards
|
|
|
|
|
Hello
I'm using the Fill-Method of the SqlDataAdapter. If i'm having two or more columns with the same name, the Adapter adds a numeric suffix to the name. I can't change the SQL's. I know it's not nice...
If i'm having more than one column with the same name, i want to access the last column with the original name.
Here a sample:
string connectionString = string.Format("Data Source={0};Initial Catalog={1};Persist Security Info={2};User ID={3};Password={4};",
"Server", "DB", false, "DBUser", "DBPassword");
SqlConnection conn = new SqlConnection(connectionString);
conn.Open();
SqlCommand sqlCommand = conn.CreateCommand();
sqlCommand.CommandType = CommandType.Text;
sqlCommand.CommandText = @"SELECT 'asd' AS strName, 'asdasd' AS strName, 'asdasdasd' AS strName";
SqlDataAdapter da = new SqlDataAdapter(sqlCommand);
DataTable test = new DataTable();
da.Fill(test);
foreach (DataColumn col in test.Columns)
{
Console.WriteLine(col.ColumnName);
}
Is there any property or something, i can access to get the original name?
Thanks
|
|
|
|
|
|
it goes to this direction... but i don't know the multiple columns before the fill-Command
|
|
|
|
|
Hi everybody
I'm trying to add controls to a FlowLayoutPanel at runtime. My problem is that the controls
that i created -> added to the Controls collection of the form and added to the FlowLayoutPanel.Controls collection are not visible.
I stick with this for now two days and i'm starting gettin nervous , so pleeeeeeaaaaase help me.
Any suggestion is welcome.
|
|
|
|
|
What kind of code did you use?
This works fine for me:
flowLayoutPanel1.Controls.Add(new Button());
Life is 5: 3 me, 1 you.
|
|
|
|
|
The FlowLayoutPanel itselfs is part of a custom usercontrol that is mainly responsible
to show items that are also custom usercontrols.
I am adding a custom UserControl to the FlowLayoutPanel in the following way :
public void AddItem(CustomControl item)
{
item.Click += new ItemClickedEventHandler(CustomItem_Clicked);
this.Controls.Add(item);
this.FlowLayoutPanel1.AddControl(item);
}
When i step throug the routine in the Debugger, the control get's added to the collection, but
it is not visible in the gui. -> Explicit refreshing or setting the controls Visible property dont affects. Furthermore in the constructor section of the child CustomControl i explicitly set the size and position of the control. -> again no effect.
|
|
|
|
|
Controls can only appear in one container. You added you CustomControl to this and your FlowLayoutPanel (I hope this.FlowLayoutPanel1.AddControl(item); means this.FlowLayoutPanel1.Controls.Add(item); ).
Add your CustomControl whenever you want to show it.
Hope can help.
Life is 5: 3 me, 1 you.
|
|
|
|
|
Solved.
The error was that i added a Control with the FlowPanel and got an error from the designer.
To fix this i deleted the control within the designer, but the reference to the control was in code
still there.
Everything that i 've done with the control was referring to the wrong instance of it.
It seems that this was an issue from the designer. Now it works fine ..
Thanks for your help.
Sometimes the easiest solution is to delete the whole project and start new from the scratch.
|
|
|
|
|
Hi,
I wrote a client/server application that connects to each other using tcp/ip socket. Both worked fine locally and remotely.
I then converted the server application to a Windows Service application and it also worked fine, but only locally.
The problem is that I cannot seems to get the client side to connect to the server (or the server is not accepting remote connection).
This is probably some security settings that is don't know about.
Any ideas?
Thanks.
|
|
|
|
|
You need to run the service under the 'NETWORK SERVICE' (I think) account. Also check the Windows Firewall is not interfering.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Thanks... Tried that and my firewall is off, but still didn't work.
modified on Tuesday, November 18, 2008 5:18 AM
|
|
|
|
|
Hai,
I don't know how to connect mysql database into my c# project can you tell me. Is it possible with the help of show data sources.
can you give me the steps.I tried with show data sources, i don't know which data source,DSN name i have to select. can you give the steps.
Thanks in advance.
|
|
|
|
|
|
Hi!
Im dealing with crystalreport from a short span of time.
im facing a problem in generating subreport within a subreport
Can subreport drill down further?
Thanks in Advance
Rajesh.
|
|
|
|
|
For Crystal Reports 2008 it is not supported. Nested Subreports is not acceptable. Not sure for other versions.
Sorry pal.
Always keep the Murphy Rules in mind!
|
|
|
|
|
I am not sure if this is the right forum ,
how do we create ranks in sql reporting service ??
|
|
|
|
|
I'd say that the SQL forum is an obvious choice here.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I have a string asa follows:
string strMyString = "<value>12345-54321 gdft</value>
<value>54678-76532</value>
<value>97865-21234</value>"
How do i pull out the data inside each value tag please?
Result should be:
12345-54321 gdft
54678-76532
97865-21234
Thanks
|
|
|
|
|
say what?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Google XmlDocument or XmlDataDocument.
Of course, this is not valid XML so you'd have to turn it into XML for the DOM to be able to parse it. Your other option is regex.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Please check the format of XML.Not a valid format.No root element is here.
Cheers!!
Brij
|
|
|
|
|
Hello all,
All solved.
I had a slight mistake in the root.
Thank you all
|
|
|
|
|
Hello. I want to learn positions of all elements on a page. I do so:
public class MsHtmlSharpParser {
IHTMLDocument2 htmlDocument;
public HtmlTreeNode htmlTree;
public MsHtmlSharpParser() {
htmlDocument = new HTMLDocumentClass();
}
public void LoadContent(string content) {
htmlDocument.write(new object[] { content });
htmlDocument.close();
((HTMLDocumentClass)htmlDocument).recalc(true);
htmlTree = new HtmlTreeNode((IHTMLDOMNode)htmlDocument.body);
}
}
public class HtmlTreeNode {
public IHTMLDOMNode htmlDomNode;
public List<htmltreenode> children;
internal HtmlTreeNode(IHTMLDOMNode htmlElement) {
this.htmlDomNode = htmlElement;
children = new List<htmltreenode>();
IHTMLDOMChildrenCollection collection = (IHTMLDOMChildrenCollection)htmlElement.childNodes;
int i1, n1 = collection.length;
for(i1=0;i1<n1;i1++)>
children.Add(new HtmlTreeNode((IHTMLDOMNode)collection.item(i1)));
}
public void GetAbsolutePosition(out int x, out int y, out int width, out int height) {
if (htmlDomNode is IHTMLElement) {
x = 0;
y = 0;
x = ((IHTMLElement)htmlDomNode).offsetLeft;
y = ((IHTMLElement)htmlDomNode).offsetTop;
IHTMLElement offsetParent = ((IHTMLElement)htmlDomNode).offsetParent;
IHTMLDOMNode parentNode = htmlDomNode.parentNode;
while (offsetParent != null) {
x += offsetParent.offsetLeft;
y += offsetParent.offsetTop;
parentNode = ((IHTMLDOMNode)offsetParent).parentNode;
offsetParent = offsetParent.offsetParent;
}
width = ((IHTMLElement)htmlDomNode).offsetWidth;
height = ((IHTMLElement)htmlDomNode).offsetHeight;
} else
x = y = width = height = -1;
}
}</htmltreenode></htmltreenode>
I call LoadContent to load html page and parse it. It works successifully, the object tree is built. But if I try to call GetAbsolutePosition, I will see that offsetHeight, offsetWidth, offsetLeft and offsetTop always return zero. Why is it so and how to solve this problem?
Thank you.
|
|
|
|
|
I've got a C dll which has a SetCallback function and I need to implement this from within a .NET C# app.
Basicly the C# app needs to pass a function pointer to the C dll so that the dll can "do stuff" and then notify the C# app that it is complete by calling the function.
I came across this[^] article and was thinking "this is exactly what I want to do. Of course I had some problems implementing it (couple typos in the article as detailed in the comments. But as I was reading the comments, I got down to the comments by leppie and Heath Stewart indicating that it isn't the proper way to do this.
So now, with all that said....my question is...Whats the proper or "right" way to call a Function within a .NET C# app from within an unmanaged C dll using a function pointer?
|
|
|
|