|
Your COM component has blown up. This means that either
a/ it's crap
b/ you've passed in invalid data AND it's crap.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Could it be that the component won't work in a web page? It's entirely possible it will only work in a Windows Forms application.
... and it's crap!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am new to C# and still learning…so for you pros out there, I’m sure this is a piece of cake.
Using Windows 2000 Server ( .NET Framework 1.1 )
#1. I need to (uncheck) not allow inheritable permissions from a parent to propagate to this object & copy previously inherited permission to this object.
#2. Add a user from Active Directory to the folders permission with Modify, Read & Execute, List Folder Content, Read and Write allowed permission.
Any help would be greatly appreciate
Thank you,
Mark
markaelkins@gmail.com
|
|
|
|
|
|
I could only find information on file permission, not folder permission?
|
|
|
|
|
Hi,
I built a windows form client app in c# that access a db on a network. Now I was wondering how can I set it up so that the app can accesses the database through the web? I don't want to rebuild the client app into an asp.net app. Maybe I could or should use Web Services that sits on a web server with database and do my updating through this route. What do you guys/gals think?
Thanks,
JJ
|
|
|
|
|
Help ~
I am currently working on a project that will create Word documents. Everything was going great until I tried to run the application on a machine w/ Office 2003. This is where I found out about PIA's.
I have taken the MSWORD9.OLB file and generated an assembly for it and move the new Microsoft.MSWORD9.dll file to the machine w/ Word 2003 everything works great - accept that my machine (which has Word 2000) is now throwing the following error **
System.InvalidCastException QueryInterface for interface Microsoft.MSWORD9._Application failed
I have add the assembly to the GAC and registered it - the lines of code where the error is thrown are as follows:
_WordApp = new Microsoft.MSWORD9.ApplicationClass();<br />
_WordDoc = _WordApp.Documents.Add(ref Missing, ref Missing, ref Missing, ref IsVisible);
Any help will be greatly appreicated
Michele
Mercer Engineering Research Center
mstusak@merc.mercer.edu
|
|
|
|
|
As you probably are aware of, there is a big difference between Office 2000 PIAs and Office 2003 PIAs. If Office 2000 PIAs can be redistributed with the application setup, well Office 2003 PIAs can not.Except ifyou want to corrupt the Office installed on the deployment machine. Office 2003 PIAs should be installed using the Office's setup add/remove function. You can find more information on: http://msdn.microsoft.com/office/default.aspx?pull=/library/en-us/dno2k3ta/html/officeprimaryinteropassembliesfaq.asp[^].
The bottom line is if you want your application to support both Office 2000 and Office 2003 you should create two separate applications, one for each version of office and distribute them according to the installed Office on the deployment machine
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up when they still are.
|
|
|
|
|
I am trying to parse a string into seperate values and am drawing a blank.
I want to fill an array with each value so that I can loop through each item later to fill out a form.
Here is what I have, followed by the error message.
<br />
string apps = "Computers,Servers,Laptops,Routers";<br />
string []arr = apps.Split(",");<br />
error msg: Argument '1': cannot convert from 'string' to 'char[]'
Any thoughts or suggestions would be appriciated. I know it should be easy, I just can't think of the right syntax.
|
|
|
|
|
apps.Split(','); // notice the single quote characters, which imply System.Char, whereas double quote characters imply System.String
or
apps.Split(new char[] {','});
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
|
|
I can't get access to the reader in
private void btnLogin_Click(object sender, System.EventArgs e)
here is the whole program. I know it is somethinge very basic. Please point it out to me.
Thanks Brian
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
<br />
}<br />
<br />
#region Web Form Designer generated code<br />
override protected void OnInit(EventArgs e)<br />
{<br />
InitializeComponent();<br />
base.OnInit(e);<br />
}<br />
<br />
private void InitializeComponent()<br />
{ <br />
this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();<br />
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();<br />
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();<br />
<br />
this.dbLoginInfo1 = new dbLoginInfo();<br />
((System.ComponentModel.ISupportInitialize)(this.dbLoginInfo1)).BeginInit();<br />
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);<br />
this.lblMessageTextBox1.TextChanged += new System.EventHandler(this.lblMessageTextBox1_TextChanged);<br />
this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;<br />
this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] <br />
{<br />
new System.Data.Common.DataTableMapping("Table", "tblEmployee", new System.Data.Common.DataColumnMapping[] <br />
{<br />
new System.Data.Common.DataColumnMapping("EmployeeID", "EmployeeID"),<br />
new System.Data.Common.DataColumnMapping("FName", "FName"),<br />
new System.Data.Common.DataColumnMapping("LName", "LName"),<br />
new System.Data.Common.DataColumnMapping("Password", "Password"),<br />
new System.Data.Common.DataColumnMapping("Username", "Username")<br />
})});<br />
this.oleDbSelectCommand1.CommandText = "SELECT EmployeeID, FName, LName, [Password], Username FROM tblEmployee";<br />
this.oleDbSelectCommand1.Connection = this.oleDbConnection1;<br />
this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=0;Data Source=""D:\MGDevelopment\SIMDAC Viewer\DB\simdac_be.mdb"";Jet OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";<br />
this.dbLoginInfo1.DataSetName = "dbLoginInfo";<br />
this.dbLoginInfo1.Locale = new System.Globalization.CultureInfo("en-US");<br />
this.Load += new System.EventHandler(this.Page_Load);<br />
((System.ComponentModel.ISupportInitialize)(this.dbLoginInfo1)).EndInit();<br />
try <br />
{<br />
this.oleDbConnection1.Open();<br />
}<br />
catch (OleDbException ex) <br />
{<br />
}<br />
OleDbDataReader OleDbReader = this.oleDbSelectCommand1.ExecuteReader(CommandBehavior.CloseConnection);<br />
while(OleDbReader.Read())<br />
{<br />
string sUserName = OleDbReader["UserName"].ToString();<br />
string sPassword = OleDbReader["Password"].ToString();<br />
<br />
}<br />
<br />
}
|
|
|
|
|
|
Sorry for onitting this.
private void btnLogin_Click(object sender, System.EventArgs e)<br />
{<br />
if (Page.IsValid) <br />
<br />
{<br />
while(OleDbReader.Read())<br />
{<br />
if(txtUserName.Text==OleDbReader["UserName"].ToString()&&<br />
(txtPassword.Text==OleDbReader["Password"].ToString()))<br />
{<br />
Response.Redirect("SelArptFrmSet.htm");<br />
}<br />
else<br />
{<br />
lblMessageTextBox1.Text = "Invalid Login!";<br />
lblMessageTextBox1.Visible=true;<br />
}<br />
}<br />
}<br />
}
|
|
|
|
|
Thank you very much!
I removed the code from the Initial component area and placed it in the btn.
Works fine.
Brian
|
|
|
|
|
Your InitializeComponent() method contains some code to read information from the database. This does not look like code that Visual Studio added to this method. Please note that Visual Studio put at the top of the method some very useful comments:
You should not have code reading anything from the database in this method.
When your button click event is fired the contents of the data reader are exhausted becuase of the code in the InitializeComponent() method so there is no more data to get, therefor the method does not function as expected.
It is good practice to open a Data Reader, get the data and close it all in one sequence. In this case that sequence should be in the button click event.
Does this help?
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Hello,
Does anyone know how to get ThreeState checkbox behavior in a TreeView? This seems like it would be a fairly common need. If all subnodes are checked, I want a regulary checked state. If only some of the child nodes are checked, I want a "partial" checked state.
Any ideas?
Thanks!
-Ian
|
|
|
|
|
|
Thanks for you help! I appreciate it!
-Ian
|
|
|
|
|
I'm trying to send commands from my C# project to the command line. The cmd is opening but the arguments are not being passed. Here is my code:
System.Diagnostics.ProcessStartInfo psi = null;
System.Diagnostics.Process proc = null;
psi = new System.Diagnostics.ProcessStartInfo("cmd");
proc = new System.Diagnostics.Process();
proc.StartInfo = psi;
System.Diagnostics.Process.Start(psi);
psi.Arguments = @"ping dev12";
Application.DoEvents();
System.Diagnostics.Process.Start(psi);
proc.WaitForExit();
Thanks.
|
|
|
|
|
The argument ARE being passed. You're just not supplying the correct arguments to CMD. The command line your passing in is this:
cmd ping dev12
Try typing that in a Start/Run box and watch what happens.
What you should be passing in is:
cmd /c ping dev12
The "/C" tells CMD to execute the following string and a command, then terminate when that command is done.
"/K" will tell CMD to remain open after the command it execute returns.
All you have to do to find this out is type "CMD /?" at a command prompt.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HI,
In my project,i am having requirement that i want to use total 6-7 different variables in one class from another form.Now how to access all that variables
in my class.
i don't want to write 6-7 properties,i know that way but anybody know any simple and efficient way to do this?
|
|
|
|
|
write a public method that returns an array with the parmaters?
there are no facts, only interpretations
|
|
|
|
|
If both the classes (or form) are in the same assembly, you can use the "internal" access-modifier for those variables to access them directly. This way, you won't have to declare them public.
|
|
|
|