|
You add it to whatever the datasource is, not the grid.
|
|
|
|
|
I am debugging C# code that utilizes the Websphere MQ Client 5.3. I have the client installed on my PC and Im running under a local account. when the code gets to where I'm initializing the MQManager I get the following:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Here is the code that is bombing:
MQEnvironment.Hostname = HostName;
MQEnvironment.Channel = Channel;
MQEnvironment.Port = Port;
mqQMgr = new MQQueueManager(QueueManager);
Source: amqmdnet
Stacktrace: at IBM.WMQ.MQClient.MQCONNX(String qMgrName, MQCNO& mqcno, Int32& pHconn, Int32& pCompCode, Int32& pReason)
at IBM.WMQ.MQClientConnector.MQCONNX(String qMgrName, MQCNO& mqcno, Int32& pHconn, Int32& pCompCode, Int32& pReason)
at IBM.WMQ.MQQueueManager.Connect(String queueManagerName)
at IBM.WMQ.MQQueueManager..ctor(String queueManagerName)
at FillTek.EAI.Avon.MarkMQOrderProcessor.MessageProcessor..ctor(String HostName, String Channel, Int32 Port, String QueueManager, String QueueName) in C:\Projects\2008 Projects\AvonManager.root\AvonManager\MarkMQOrderProcessor\MessageProcessor.cs:line 121
at MarkMQOrderProcessorApp.Processor.Main(String[] args) in C:\Projects\2008 Projects\AvonManager.root\AvonManager\MarkMQOrderProcessorApp\Processor.cs:line 24
Any help would be greatly appreciated!
JeanieB
|
|
|
|
|
Looks like a bug in WMQ to me
|
|
|
|
|
Thanks so much for the response. I figured out what the issues was. The entire PC needed to be re-imaged. The registry along with the GAC was total fried. Rather than going thru one by one and figuring out what dlls need register I found it easier to just re image the PC. But thanks again!
JeanieB
|
|
|
|
|
Hi
i want to change connection string that saved in app.config (which created in visual studio wizard dialog).
i changed some Settings.Designer.cs code which described in this thread[^] to make that editable. that's works good when i change it at runTime and load it again, but when i exit from my app and look at my saved properties, it's again backed to earlier settings (before my edit).
what's the problem and how to solve this ?
thanks
|
|
|
|
|
Could you share the code snippets…So that we can get the actual scenario properly?
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
here is my Settings.Designer.cs code (my modification code is bold) :
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
public string mehrConnectionString {
get {
return ((string)(this["mehrConnectionString"]));
}
set
{
this["mehrConnectionString"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
public string mehrConnectionString1 {
get {
return ((string)(this["mehrConnectionString1"]));
}
set
{
this["mehrConnectionString1"] = value;
}
}
here is my code to save in app.config :
Properties.Settings.Default.serverName = this.txtServer.Text;
Properties.Settings.Default.userName = this.txtUser.Text;
Properties.Settings.Default.password = this.txtPass.Text;
if (this.radioLocal.Checked)
{
Properties.Settings.Default.network = false;
Properties.Settings.Default.mehrConnectionString = string.Format("Data Source={0};Initial Catalog=mehr;Integrated Security=True", this.txtServer.Text);
Properties.Settings.Default.mehrConnectionString1 = string.Format("Data Source={0};Initial Catalog=mehr;Integrated Security=True", this.txtServer.Text);
}
else
{
Properties.Settings.Default.network = true;
Properties.Settings.Default.mehrConnectionString = string.Format("Data Source={0};Initial Catalog=mehr;User Id={1};Password={2};", this.txtServer.Text, this.txtUser.Text, this.txtPass.Text);
Properties.Settings.Default.mehrConnectionString1 = string.Format("Data Source={0};Initial Catalog=mehr;User Id={1};Password={2};", this.txtServer.Text, this.txtUser.Text, this.txtPass.Text);
}
Properties.Settings.Default.Save();
regards
|
|
|
|
|
Probably you are loading the app.config several times, why dont you use a Hashtable for managing multiple connectionstring
Example:
Hashtable ObjHashtable = new Hashtable();
ObjHashtable.Add("Key1", "Data Source= source_1 ;Initial Catalog= DatabaseName_1;User ID=id;Password=pwd;");
ObjHashtable.Add("Key2", "Data Source= source_2 ;Initial Catalog= DatabaseName_2;User ID=id;Password=pwd;");
You just need to load the Hashtable only one time...........
public SqlDataReader Example(string strSql, string strKey)
{
ObjSqlConnection = new SqlConnection(ObjHashtable[strKey].ToString());
...........
.......
}
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Thanks Md. Marufuzzaman
i want to save my connection string in app.config to save this state in future use. next time it must use the saved settings which user set.
|
|
|
|
|
You are most welcome.......
Absolutely you save your connectionString in your app.config.
My point of view was:
1. Read your config file
2. Fill the HasTable
3. Use the HasTable runtime so that you not need to invoke config file several times.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
my problem is that i can't store my settings in app.config file. it's not persistence.
|
|
|
|
|
I am looking into a simular issue and although, I am no expert, I think app.config is used in design time and [appname].exe.config is for release and where the changes need to be made... anyone, please correct me if I'm wrong on this.
All the best
cjoki
|
|
|
|
|
hi
how to use navigator in datagridview
can any one provide me link.
thanks
|
|
|
|
|
sure[^], no problem.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
|
Mr. Hot Thought -
Can you provide a correct subject.
|
|
|
|
|
I have a simple program. It has one Form called frmMain, and another Class called Poker. I have the following snippit routine below. The name 'Color' does not exist in this context. What do I need to do to make this work?
public void Results(Label lbl_1)
{
frmMain Form1 = new frmMain();
lbl_1.ForeColor = Color.Yellow;
Form1.lblWinnings.Text = "100";
}
|
|
|
|
|
yogi_bear_79 wrote: The name 'Color' does not exist in this context.
Include using System.Drawing; at the top of your source module.
|
|
|
|
|
|
When you get this error if you hover your mouse over the offending item, you should see a rectangle appear under the rightmost letter of the word. Moving the pointer over this rectangle changes it to a drop-down, offering solutions. Simply select the 'using System.Drawing' one and bob's-your-uncle.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
Hi.
I am about to program a piece of software which contains a single server, and about 20-40 clients.
All parts can be spread out on a lan, or on a wan.
The server shall be able to broadcast/multicast to the clients in some way, and the clients should be able to fetch information from the server.
There are about 30 kinds of information which has to be fetched/broadcasted.
Question is, how to solve this general problem in the most elegant way?
I would be happy if i could avoid switches in the client/server end to check what kind of information i received, or make my own kind of application layer protocol to check it.
I had a look at remoting, like RMI in java, but that seems to be a very bad idea over WAN because of firewalls and such.
Do you have any insight in possible solutions for this?
Thanks alot
|
|
|
|
|
|
Hi,
I'm trying to process the HTML source code from a certain web page.
This web page has security enabled, using a Username & a password.
I'm using the following method to try to access the page:
public static string GetHtmlPageSource(string url, string username, string password)
{
WebClient wc = new WebClient();
wc.Credentials = new NetworkCredential(username, password);
try
{
using (Stream stream = wc.OpenRead(new Uri(url)))
{
using (StreamReader reader = new StreamReader(stream))
{
return reader.ReadToEnd();
}
}
}
catch (WebException e)
{
return e.ToString();
}
}
This doesn't work however, I seem to be stuck at the logon page. I'm not able to pass the user security.
Anyone has an idea?
|
|
|
|
|
Do you not think that the site owners put the security there for a reason?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|