|
I have used the checkbox in the DateTimePicker control to register the date when a vaccine was applied to a child. If the the checkbox is checked, then the vaccine has been applied and the date specifies when. If the checkbox is unchecked, the vaccine hasn't been applied, and the date doesn't matter (it's grayed out.)
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I need to create 2 dimensional arrays. How can I store them? I don`t know how many of them, so the collection must be done dynamicaly.
The second qestion is, how can I display all of that arrays in one ie List box, data grid?
thx
|
|
|
|
|
Just create an Arraylist of arrays. Like
public class Foo
{
ArrayList list = new ArrayList();
public void Add(int []x)
{
list.Add(x);
}
public void ListAll()
{
foreach(int [] arr in list)
{
for(int i = 0; i<arr.Length; ++i)
Console.WriteLine(arr[i]);
}
}
}
Each element in list can be an array of any size and there can be as many elements in the list as you want.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks,
but how can I display every element of this list at once (containing 2 dimensional array objects) in windows forms ?
Maybe use data grid, but have no idea how to.
|
|
|
|
|
I'm trying to open a local file in the WebBrowser control but I cannot figure out, how to do it.
How do I do that?
|
|
|
|
|
How to view AutoCad file in C# like zoom in, view, zoom out. Please tell me. Thank.
|
|
|
|
|
You're going to need a component that can read and understand the file format and render it properly. I don't know of any. You might want to check with AutoDesk to see if they have something that might work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am running the following code. It executes when the value of variable i is 1 and when the loop continues and value of i becomes 2 i am getting error "Object reference not set to an instance of an object" in the cmdSearch.CommandText line in the code. . There is no problem with connection string. It successfully retrieves when i = 1. Can anybody help me out what is the problem. Please post with corrected code if anybody can help.
===========================================
for (int i=1; i <= objFolder.Items.Count; i++)
{
System.Data.OleDb.OleDbConnection odbSearch = new System.Data.OleDb.OleDbConnection();
System.Data.OleDb.OleDbCommand cmdSearch = new System.Data.OleDb.OleDbCommand();
odbSearch.ConnectionString = strConn;
cmdSearch.Connection = odbSearch;
item = (Outlook.ContactItem) objFolder.Items.Item(i);
string em = item.Email1Address;
cmdSearch.CommandText = "select * from Outlook_Contacts where FirstName='"+fn.ToString().Trim()+"' and LastName='"+ln.ToString().Trim()+"'";
odbSearch.Open();
OleDbDataReader rdrSearch = cmdSearch.ExecuteReader();
while( rdrSearch.Read())
{
RecordFlag = true;
}
odbSearch.Close();
}
===========================================
|
|
|
|
|
What are fn and ln? Where are they defined?
|
|
|
|
|
fn and ln are declared outside and the values are properly getting passed to those variables. The code executes when i=1 and when the value of i becomes 2 the error occurs. There is no problem with connection string also. only when the code executes to the commandtext line it shows the error. that too i am getting one record successfully(when i = 1). hope this helps
|
|
|
|
|
well, some thing is null. It is either item, cmdSearch, fn or ln.
can you step through it in VS and check?
|
|
|
|
|
I have done that. I am getting one record ie. when the value of i = 1. When the value of i increases to 2 then in the commandtext line this error occurs. And also fn and ln are fine. Can you please tell me how to solve it?
|
|
|
|
|
Like bigtrev said, just step through and check fn and ln .
Or perhaps you got the line number wrong and item is null.
Anyway, just step through and check.
Btw. you know that building SQL commands the way you do is highly vulnerable to SQL injection?
You should use parameterized queries instead.
Regards,
mav
|
|
|
|
|
hi,
when enabling visual style in an application ,tool bar button disappear , how to cater it so that visual style and tool bar button can be enable at the same time.
|
|
|
|
|
Don't forget the call to Application.DoEvents();
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new AgilePlannerMainForm());
Maybe that solves your problem.
Claudio
Claudio's Website
|
|
|
|
|
Please tell me the way to build a "Add-in" in .Net. I also need some documents and articles about this detail.
You can mail me at: vonhattruong@yahoo.com.hk
Thank you very much
|
|
|
|
|
What do you mean by Add-in in .NET? An Add-in for Visual Studio .NET? Or an Add-in architecture for your own application?
Anyway: Why don't you search here on codeproject? There are several articles about Add-Ins for Visual Studio as well as complete Add-in architectures for your own applications.
Claudio
Claudio's Website
|
|
|
|
|
It's "Add-ins for Visual Studio .Net" . Thank you for your information. It helps me a lot in my project.
|
|
|
|
|
In my setup project (for Windows application), a dependency is shown for the dotNETFXRedist_x86_enu.msm. However when i try to include this in my setup file (by removing the checkbox on Exclude button on this file)
"dotNETFXRedist_x86_enu.msm must not be used to redistribute the .NET Framework. Please exclude this merge module."
What can be the reason? Do i have to include some other file for including the .NET framework in my setup program?
|
|
|
|
|
The merge module is there for VS.NET to check the dependencies of your program.
The Exclude flag is set by default because M$ doesn't allow distribution of the .NET framework this way.
You have to install .NET prior to installing your app.
MSDN[^] describes the different ways you can go.
Regards,
mav
|
|
|
|
|
When i prepare a setup project and do not include .NET runtime (redistributable) framework in setup project, will the setup program automatically give an error message to user (on whose machine .NET fw does not exist) at the time of installation indicating that first he should install the .NET fw and then gracefully exit the installation? Or I have to test myself in the code whether the .NET exists on user's machine? (My test on one or two such machines showed that such an error is automatically displayed - but does it happen always?)
Secondly, can anyone suggest from practical experience as to roughly how many machines running windows (irrespective of versions) would have .NET framework already installed? I will appreciate even a wild guess ( say about 25% machines, 50% or 90%). This will help me in deciding whether to include .NET fw (a heavy size) in my shareware application setup program or to take the risk of a few machines being told by setup to download the same from the Internet instead of i carrying such heavy beggage in my setup program.
|
|
|
|
|
If your setup project was created using the one that comes with Visual Studio, and not using something like Wise for Windows Installer, then yes, the installation will not launch if the .NET Framework is not installed already.
As for the number of machines that have the framework installed? Who cares. A better question would be how many of your customers run on broadband as opposed to dial-up. Also, a user might have the .NET Framework installed, but not the version that your application requires. Instead of trying to decide if you should supply the .NET Framework redis with your app, supply it as a seperate download! Supply a link to Microsoft's download site if you have to. Make sure it's for the version of the .NET Framework that your application requires. They can be installed side-by-side without any side effects.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello world
can you helpe me
ang get me source code
tankyou
|
|
|
|
|
If you're looking for source code, try Google.
If you're looking for help with YOUR source code, then ask a specific question about it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I'm trying to use late binding for office automation with the following code example from microsoft:
http://support.microsoft.com/?scid=kb%3Ben-us%3B302902&x=2&y=7#5
Compiling the application is no problem.
But when starting it i get an exception which tells me that something is wrong with mscorlib.dll.
I tried this code example on 2 Windows 2000 maschines and a XP maschine, all with visual studio.net 2003, but always the same exception.
Has anybody an idea?
Regards
|
|
|
|