dotnet windows forms:
Could a lot of things regarding permissions. Here is
a code sample on it that might be useful:
http://www.eggheadcafe.com/articles/20021125.asp http://www.eggheadcafe.com/articles/20040620.asp --
Robbe Morris - 2004-2006 Microsoft MVP C#
I've mapped the database to .NET class properties and methods to
implement an multi-layered object oriented environment for your
data access layer. Thus, you should rarely ever have to type the words
SqlCommand, SqlDataAdapter, or SqlConnection again.
http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp [quoted text, click to view] "Bishoy George" <bishoy@bishoy.com> wrote in message
news:%23Iq4pyB5GHA.2264@TK2MSFTNGP02.phx.gbl...
>I have an application that get data and write xml file from this data.
> The application should put the data as a message in the Message Queuing.
> Every time I encounter an error saying: "The queue does not exist or you
> do not have sufficient permissions to perform the operation".
>
> This is designer code:
> ---------------------
>
> namespace ReceiveOrder
> {
> partial class ReceiveOrder
> {
> /// <summary>
> /// Required designer variable.
> /// </summary>
> private System.ComponentModel.IContainer components = null;
>
> /// <summary>
> /// Clean up any resources being used.
> /// </summary>
> /// <param name="disposing">true if managed resources should be
> disposed; otherwise, false.</param>
> protected override void Dispose(bool disposing)
> {
> if (disposing && (components != null))
> {
> components.Dispose();
> }
> base.Dispose(disposing);
> }
>
> #region Windows Form Designer generated code
>
> /// <summary>
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> /// </summary>
> private void InitializeComponent()
> {
> this.label1 = new System.Windows.Forms.Label();
> this.label2 = new System.Windows.Forms.Label();
> this.label3 = new System.Windows.Forms.Label();
> this.Status = new System.Windows.Forms.Label();
> this.WelcomeMessage = new System.Windows.Forms.Label();
> this.ProductID = new System.Windows.Forms.TextBox();
> this.Quantity = new System.Windows.Forms.TextBox();
> this.EmailAddress = new System.Windows.Forms.TextBox();
> this.Checkout = new System.Windows.Forms.Button();
> this.SuspendLayout();
> //
> // label1
> //
> this.label1.AutoSize = true;
> this.label1.Location = new System.Drawing.Point(12, 26);
> this.label1.Name = "label1";
> this.label1.Size = new System.Drawing.Size(55, 13);
> this.label1.TabIndex = 0;
> this.label1.Text = "ProductID";
> //
> // label2
> //
> this.label2.AutoSize = true;
> this.label2.Location = new System.Drawing.Point(12, 66);
> this.label2.Name = "label2";
> this.label2.Size = new System.Drawing.Size(49, 13);
> this.label2.TabIndex = 1;
> this.label2.Text = "Quantity";
> //
> // label3
> //
> this.label3.AutoSize = true;
> this.label3.Location = new System.Drawing.Point(12, 106);
> this.label3.Name = "label3";
> this.label3.Size = new System.Drawing.Size(73, 13);
> this.label3.TabIndex = 2;
> this.label3.Text = "Email Address";
> //
> // Status
> //
> this.Status.AutoSize = true;
> this.Status.Location = new System.Drawing.Point(12, 196);
> this.Status.Name = "Status";
> this.Status.Size = new System.Drawing.Size(0, 13);
> this.Status.TabIndex = 3;
> //
> // WelcomeMessage
> //
> this.WelcomeMessage.AutoSize = true;
> this.WelcomeMessage.Location = new System.Drawing.Point(12,
> 236);
> this.WelcomeMessage.Name = "WelcomeMessage";
> this.WelcomeMessage.Size = new System.Drawing.Size(0, 13);
> this.WelcomeMessage.TabIndex = 4;
> //
> // ProductID
> //
> this.ProductID.Location = new System.Drawing.Point(88, 22);
> this.ProductID.Name = "ProductID";
> this.ProductID.Size = new System.Drawing.Size(243, 20);
> this.ProductID.TabIndex = 5;
> //
> // Quantity
> //
> this.Quantity.Location = new System.Drawing.Point(88, 62);
> this.Quantity.Name = "Quantity";
> this.Quantity.Size = new System.Drawing.Size(243, 20);
> this.Quantity.TabIndex = 6;
> //
> // EmailAddress
> //
> this.EmailAddress.Location = new System.Drawing.Point(88, 102);
> this.EmailAddress.Name = "EmailAddress";
> this.EmailAddress.Size = new System.Drawing.Size(243, 20);
> this.EmailAddress.TabIndex = 7;
> //
> // Checkout
> //
> this.Checkout.Location = new System.Drawing.Point(88, 141);
> this.Checkout.Name = "Checkout";
> this.Checkout.Size = new System.Drawing.Size(75, 23);
> this.Checkout.TabIndex = 8;
> this.Checkout.Text = "Checkout!";
> this.Checkout.UseVisualStyleBackColor = true;
> this.Checkout.Click += new
> System.EventHandler(this.Checkout_Click);
> //
> // ReceiveOrder
> //
> this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
> this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
> this.ClientSize = new System.Drawing.Size(343, 197);
> this.Controls.Add(this.Checkout);
> this.Controls.Add(this.EmailAddress);
> this.Controls.Add(this.Quantity);
> this.Controls.Add(this.ProductID);
> this.Controls.Add(this.WelcomeMessage);
> this.Controls.Add(this.Status);
> this.Controls.Add(this.label3);
> this.Controls.Add(this.label2);
> this.Controls.Add(this.label1);
> this.Name = "ReceiveOrder";
> this.Text = "Receive Order";
> this.ResumeLayout(false);
> this.PerformLayout();
>
> }
>
> #endregion
>
> private System.Windows.Forms.Label label1;
> private System.Windows.Forms.Label label2;
> private System.Windows.Forms.Label label3;
> private System.Windows.Forms.Label Status;
I have an application that get data and write xml file from this data.
The application should put the data as a message in the Message Queuing.
Every time I encounter an error saying: "The queue does not exist or you do
not have sufficient permissions to perform the operation".
This is designer code:
---------------------
namespace ReceiveOrder
{
partial class ReceiveOrder
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.Status = new System.Windows.Forms.Label();
this.WelcomeMessage = new System.Windows.Forms.Label();
this.ProductID = new System.Windows.Forms.TextBox();
this.Quantity = new System.Windows.Forms.TextBox();
this.EmailAddress = new System.Windows.Forms.TextBox();
this.Checkout = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 26);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(55, 13);
this.label1.TabIndex = 0;
this.label1.Text = "ProductID";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 66);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(49, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Quantity";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 106);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(73, 13);
this.label3.TabIndex = 2;
this.label3.Text = "Email Address";
//
// Status
//
this.Status.AutoSize = true;
this.Status.Location = new System.Drawing.Point(12, 196);
this.Status.Name = "Status";
this.Status.Size = new System.Drawing.Size(0, 13);
this.Status.TabIndex = 3;
//
// WelcomeMessage
//
this.WelcomeMessage.AutoSize = true;
this.WelcomeMessage.Location = new System.Drawing.Point(12,
236);
this.WelcomeMessage.Name = "WelcomeMessage";
this.WelcomeMessage.Size = new System.Drawing.Size(0, 13);
this.WelcomeMessage.TabIndex = 4;
//
// ProductID
//
this.ProductID.Location = new System.Drawing.Point(88, 22);
this.ProductID.Name = "ProductID";
this.ProductID.Size = new System.Drawing.Size(243, 20);
this.ProductID.TabIndex = 5;
//
// Quantity
//
this.Quantity.Location = new System.Drawing.Point(88, 62);
this.Quantity.Name = "Quantity";
this.Quantity.Size = new System.Drawing.Size(243, 20);
this.Quantity.TabIndex = 6;
//
// EmailAddress
//
this.EmailAddress.Location = new System.Drawing.Point(88, 102);
this.EmailAddress.Name = "EmailAddress";
this.EmailAddress.Size = new System.Drawing.Size(243, 20);
this.EmailAddress.TabIndex = 7;
//
// Checkout
//
this.Checkout.Location = new System.Drawing.Point(88, 141);
this.Checkout.Name = "Checkout";
this.Checkout.Size = new System.Drawing.Size(75, 23);
this.Checkout.TabIndex = 8;
this.Checkout.Text = "Checkout!";
this.Checkout.UseVisualStyleBackColor = true;
this.Checkout.Click += new
System.EventHandler(this.Checkout_Click);
//
// ReceiveOrder
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(343, 197);
this.Controls.Add(this.Checkout);
this.Controls.Add(this.EmailAddress);
this.Controls.Add(this.Quantity);
this.Controls.Add(this.ProductID);
this.Controls.Add(this.WelcomeMessage);
this.Controls.Add(this.Status);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "ReceiveOrder";
this.Text = "Receive Order";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label Status;
private System.Windows.Forms.Label WelcomeMessage;
private System.Windows.Forms.TextBox ProductID;
private System.Windows.Forms.TextBox Quantity;
private System.Windows.Forms.TextBox EmailAddress;
private System.Windows.Forms.Button Checkout;
}
}
-----------------------------------------------------------------------------------------
This is my code:
---------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Xml;
using System.Messaging;
using System.Globalization;
namespace ReceiveOrder
{
public partial class ReceiveOrder : Form
{
AccessControlList acl;
MessageQueue queue;