|
can you help me please, how can write the initializing this variable "myint" in form1 ?
Yours !
mostafa hosseiny b.
-- modified at 7:55 Thursday 8th September, 2005
|
|
|
|
|
just simply assign ur variable in form1 constructor, somthing like this:
public form1()
{
myint = 4;
}
<< >>
|
|
|
|
|
thanks! but there is one difficult:
myint is in
btnOk_Click() Event and the value of this variable ,maby be vary ... ,
for example , everytime I run the application , the value of this variable maybe 1 OR 5 OR 8 and etc.
Yes , if we put a const value in the initializing for this , crtainly , we have no difficult but "myint" is in the btnOK_Ckick() Event.
guide me please!
thanks!
mostafa hosseiny b.
|
|
|
|
|
ok, in form2, just do followings:
form1 getintform1 = new form1();
getintform1.btnOK_Click(null,null) to assign ur variable
after that, u can get the value of ur variable.
<< >>
|
|
|
|
|
at the first , where I write the
getintform1.btnOK_Click(null,null);
In form_Load() or ...
and at the second ,how to assign my variable(myint in form1) to getmyint in form2?yours!
mostafa hosseiny b.
|
|
|
|
|
u call getintform1.btnOK_Click(null,null); after getintform1 is innitialized
after the function above is called, the variable myint is assigned the value
manije wrote:
how to assign my variable(myint in form1) to getmyint in form2?
just call: getmyint = getintform1.myint;
Hope this answers
<< >>
|
|
|
|
|
in form2 I wrote :
....
...
Form1 getintform=new Form1();
...
public Form2()
{
InitializeComponent();
getintform.btnOK_Click(null,null);
}
....
private void Form2_Load(object sender, System.EventArgs e)
{
....
int getmyint;
getmyint=getintform.myint;
....
}
Is it Right? Certainly No!Because I do'nt get any result?
Pleazzzz , help me!
mostafa hosseiny b.
|
|
|
|
|
how can i calculate the number of days in the current month in MS SQL Server 2000. can any body help me, no matter wether usage of Stored Proc, or any other code, i am sick of working on it.
FIRE
|
|
|
|
|
This will do it.
DECLARE @MonthInt int
DECLARE @YearInt int
DECLARE @TempVarChar varchar(30)
DECLARE @Mth_Start datetime
DECLARE @Mth_End datetime
DECLARE @DaysInMonth int
SET @MonthInt = 08
SET @YearInt = 2005
-- GET START NEXT MONTH START IN Char
Set @TempVarChar = '01/' + CAST(@MonthInt As Varchar(2) ) + '/' + CAST(@YearInt As Varchar(4) )
-- Convert to Date
Set @Mth_Start = (Convert( datetime, @TempVarChar, 103 ))
-- Go Back one day to get last day in Month.
Set @Mth_End = DATEADD( dd, -1, @Mth_Start)
-- Get total days in Month
SET @DaysInMonth = DATEPART(dd, @Mth_end)
SELECT @DaysInMonth
|
|
|
|
|
I'm trying to connect to Exchange 2003 and gain access to Appointment information. I have seen a few articles about doing this in webDev, or something like that, but know nothing about how it works. I am coding in C#. I tried Microsofts website, under their Exchange Developer section but couldnt't find any actual code camples. Is there a nice simple wasy way of connecting to Exchange and extracting information and I just haven't been able to find it, preferably using ADO.NET and by easy hopefully like connecting to a sql or OleDB connection.
--Peter
|
|
|
|
|
Hello
I've install MSDE and my soft don't run !
I think it's because anything listen at the port 1433
When i write "netstat -na" in the command window , any port 1433 !
How can i open this port ?
thank you
SeLoRBIS
|
|
|
|
|
hi there,
sorry if I misunderstood ur mean.
u mean that MSDE cannot run because the port 1433 is already occupied by another process, right?
SeLoRBIS wrote:
How can i open this port ?
if so, u cannot open this port because it's alredy openned.
so the only way in this case is that u need to find out which program/process is using this port. Then stop it and install MSDE
Gud luke
<< >>
|
|
|
|
|
The port 1433 is the port use by MSDE or MS SQL Server !
But he's not use by another application .
He's not use , that all .
And i want that MSDE use it!
When i write "netstat -na" in console windows I see he's not heard by anything !
He's Closed .
It's the reason , my application don't communicate with the database MSDE
Thank You !
SeLoRBIS
|
|
|
|
|
if the port 1433 is already bound by a process, this can not be used anymore ...
so if u want to use it in MSDE u must to make sure that it's not being used by any process before installing MSDE
<< >>
|
|
|
|
|
I say to you that the port 1433 is not use by any process : it's the problem !
SeLoRBIS
|
|
|
|
|
Gud luke to u
<< >>
|
|
|
|
|
Yes ok ! i think i'll find better by my self lol
SeLoRBIS
|
|
|
|
|
I've configured several COM components to support transactions, and they are called by my C# serviced component, which is configured to require a new transaction.
However my component fails on the first COM call, with an error saying that the new transaction could not enlist in the specified transaction coordinator. Is this a cross machine problem, and if so, would having all components and databases running on one machine under one coordinator solve it?
I'm new to this, any help would be appreciated.
The DJ's took pills to stay awakwe and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
Having the components all on one server isn't the issue. COM+ allows for cross machine transactions, look elsewhere for the solution.
|
|
|
|
|
|
hi there,
manije wrote:
get id from a table
=> using ExecueScalar to get id from DB. then convert and assign it to a variable
manije wrote:
I want to display(id) in a messagebox
=> convert ur variable to string and display this in a msgbox
<< >>
|
|
|
|
|
|
thanks for your reply !
I'm a beginner in C# .
Can you write the code please !
Remember
my variable is GetId[int] and my table has 3 fields ,id[int],name[nvarchar],fname[nvarchar] and I want to put the id (from the table ) into the variable (GetID). THANKS!
mostafa hosseiny b.
-- modified at 7:43 Wednesday 7th September, 2005
|
|
|
|
|
manije wrote:
I'm a beginner in C# .
Can you write the code please !
It doesn't matter that you are a beginner, you have to think through the problem for yourself otherwise you will learn nothing. I have already seen that you ignored my advice - there could be a valid reason for this, but I don't know what that it. From my point of view I am just being ignored and for the money* I'm getting for providing this service it really isn't worth it.
Hint: I don't get paid for this. I volunteer my own time and my own equipment to try and help - but you have to show that you are willing to learn and not just copy and paste code snippets
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Derar Colin Angus Mackay !
Certainy I accept your Advice , and in this way , it's need to me to try do best ... . Learn,Understand of the concept ... ,
in any case I have to study and ask to every one can help me !
by the way , finally and after a day , I write this to reply my app.
int mygetid=Convert.ToInt32(mytable.Rows[0][0]);<br />
MessageBox.Show(this.mygetid.ToString());
---------------------
in any case , thanks in advance again for your patient
mostafa hosseiny b.
-- modified at 3:19 Thursday 8th September, 2005
|
|
|
|