|
hi there,
have a look at on these:
1.http://www.visoracle.com/ada/bmg.html
2.http://www.itlocation.com/en/software/prd53603,,.htm
remember the google uncle.
<< >>
|
|
|
|
|
If you have a licence for the Sql server client tools, then you can use that.
Otherwise you are stuck with the commandline tools or 3rd party applications.
I like to use this[^] when I'm working with MSDE. Not as friendly as the MS tools but does the job well.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Let's presume I have Table1 and Table2 already created and with same strucuture. Table1 has all data. So is this fastest way to copy data:
INSERT INTO Table2
SELECT * FROM Table1
?
Tnx
|
|
|
|
|
I think this is the fastest. You can try comparing the performance with
SELECT * INTO Table2 FROM Table1
Live Life King Size
Alomgir Miah
|
|
|
|
|
If they are in the same database this should be the fastest or close to it.
If you have the transaction log configured to not log it, then using SELECT * INTO Table2 will create table2 and won't be logged which is faster.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Hi All!
I have a variable in Form1 named:GetID(int) and everytime I run Myapplication , its value maybe vary Like 2 or 9 or 5 or ...
THIS variable is in btnOK_Click() :
here is my code in Form1:
.....
public int GetID;
....
public void btnOK_Click(object sender, System.EventArgs e)
{
.....
GetID=Convert.ToInt32(UserTable.Rows[0][0]);
....
}
I want to put (this value=GetID) into the another variable in Form2 that named :MyGetID in Form2_Load():
Here is my code on form2:
.......
Form1 myform1=new Form2();
........
private void Form2_Load(object sender, System.EventArgs e)
{
int MyGetID;
MyGetID=:zzz:(?GetID);
....
...
}
infact I want to put the value of GetID(the variable in Form1) into the MyGetID(The variable in Form2)
How Can I do it ...?
Please Help me!
thanks!
mostafa hosseiny b.
|
|
|
|
|
Many ways, all depends on timing... When do you need the value exactly
Static variable in form1..
public static int x;<br />
myID = form1.x;
or
Change the form2 constructor, declare a local private variable.
(Note: you can have multiple constructors).
Class Form2{<br />
private int var;<br />
Form2(int x){<br />
var = x;<br />
}<br />
}
in form1 create as
form2 f = new form2(x);
or
as a property
public int x{get(...)set(...)}
Hope that helps.
|
|
|
|
|
hi,dear friend!
Via to:
public static int x;
myID = form1.x;
because of "x" is variable in a Event(btnOK_Click()),
,myGetID return a value=0(Zero),
but,using a property in form1 and form2 , I can solve the problem .
thanks again!
yours!
mostafa hosseiny b.
|
|
|
|
|
Hi
I have a select statement that returns (A int ,B int)
and another select statement that returns (C int , D int)
in a storedprocedure.
I need that sp returns a resultset as (A,B,C,D);
What should i do plz?
|
|
|
|
|
You can combine the two queries as following,
select Select1.A, Select1.B, Select2.C, Select2.D
from
(select A, B from Table1) as Select1,
(select C, D from Table2) as Select2
Please note that this will give you the cross product.
|
|
|
|
|
if they are scalar values you are dealing with then just do this.
<br />
declare @a int,<br />
@b int,<br />
@c int,<br />
@d int<br />
select @a = 1, @b= 2<br />
<br />
select @c = 3, @d= 4<br />
<br />
select @a as ColA, @b as ColB, @c as ColC, @d as ColD
Else, if it is a rowset, then do what alam_pune said,
but pull a join column from each of the sub selects in
order to join the rowsets to avoid the cartesian product
<br />
<br />
select Select1.A, Select1.B, Select2.C, Select2.D<br />
from<br />
(select A, B, PriKeyCol from Table1) as Select1<br />
inner join<br />
(select C, D, ForKeyCol from Table2) as Select2 on select1.PriKeyCol = select2.ForKeyCol
|
|
|
|
|
Hi ,
I have around 400 of crystal reports and have been asked to convert them to sql reports using sql 2005 reporting services. I am little puzzled whether is this possible through any tool or I would have to convert it one by one.
Please help
Ashu Sharma
SSE
|
|
|
|
|
|
hi there,
to access the variable GetID of form1 from form2, u have to pass the reference of form1 to form2
Hope this helps
<< >>
|
|
|
|
|
|
assumption in form2, u already had a form1 variable, named as m_frm1 and have a property to assign the value to this variable
before showing form2, u need to assign instance of form1 to the variable m_frm1
the code should be something like this
Form2 frm2 = new Form2();
frm2.Form1 = this; //this here is form1 object
frm2.showDialog();
<< >>
|
|
|
|
|
|
pls try the below code:
private void frmPublic_Load(object sender, System.EventArgs e)
{
int myGetID;
Form1 myGetForm1 = new Form1();
myGetForm1.btnOK_Click(null,null); //init ur variable in form1
int myGetID= myGetForm1.GetID; //assign here
....
}
<< >>
|
|
|
|
|
This is really crappy advice, sorry. If he wants to pass an ID, he should just pass the ID, not an entire form instance, which would also mean having to make the variable public.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yes u are right, Christian.
this is really stuppid.
Thanx
|
|
|
|
|
dear,Friends!
Be Patient in all over your life!life is difficult ,special more difficult for us because we are a beginner in c# .
in any case ,finally ,I found the following way for solve my problem :
----------------
in Form2:
....
public class Form2:...
{
....
private static Form1 tofrmUsername;
public static Form1 TofrmUsername
{
get
{ return tofrmUsername; }
set
{ tofrmUsername = value;}
}
AND in Form1:
....
private int GetID;
....
public void btnOK_Click(object sender, System.EventArgs e)
{
....
GetID=Convert.ToInt32(UserTable.Rows[0][0]);
Form2.TofrmUsername = this;
....
}
....
public int Get_GetID
{
get { return GetID; }
}
And Finally In Form2_Load()
private void Form2_Load(object sender, System.EventArgs e)
{
Form1 mygetidForm= TofrmUsername;
int myGetID= mygetidForm.Get_GetID;
....
}
Thanks For Everything!
yours!
mostafa hosseiny b.
|
|
|
|
|
CPians glad to solve probs
<< >>
|
|
|
|
|
How to retrieve 100 records when joining 2 tables in a select statement?
Aarsth
|
|
|
|
|
SELECT TOP 100 t1.field1, t1.field2, t2.field2, t3,field3
from t1, t2
WHERE t1.field1 = t2.field2
ORDER BY t1.field1 DESC
The "SELECT top 100" is dependant on your ORDER BY. So you can order by "SALES DESC" and get the TOP 100 sales by customers.
another example: This will get top 100 customers by DESCending Year to Date sales.
SELECT TOP 100 Cust.CustID, Cust.Name, Sum(orders.order_value)
from orders, Cust
WHERE orders.CustID = Cust.CustID
AND YEAR(orders.date) = 2005
GROUP BY Cust.CustID, Cust.Name
ORDER BY Sum(orders.order_value) DESC
|
|
|
|
|
Hi,
I am using ODBC to look up information in a small table (approx 400 rows of columns AutoID(auto incrementing), ID(long passed on row addition), House_Num (text passed on row addition), Place_Name (text passed on row addition) and Reserve_Name (text also passed on row addition).
House_Num can be either a series of numbers or a letter/number combination. Adding all of the rows went fine.
I'm now trying to search the database to return the ID of a specific House_Num and Reserve_Name combination. Using CRecordset.m_strFilter I can find the all numbers House_Num, however every time I try and use a number/letter combination I get an undefined error and the program is killed.
It doesn't seem to matter if I separate the letters/numbers at all in the m_strFilter.
Does anyone have any ideas?
Thanks,
Drew Doering, Paramedic
|
|
|
|