|
How to use the currency manager please?? I am trying to make new record with the currency manager. I have a relational database and I want to make new records with the currency manager. How can i use it please. i am not using any array. i want to make position + 1 as well with it! how can i use it please??
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
rfebin2001 wrote: But i want to pass the error to the DAL Factory Class and we throw as a errror
I don't quite understand how you would do that. The DAL Factory class would instantial a DAL object and it would be your DAL object that communicates with the database. The DAL Factory Class' sole purpose in life should just be to construc DAL objects. If it does anything else then its responsibility is overloaded.
I'll assume for the rest that you meant DAL class/object
rfebin2001 wrote: that is the SQL exception error plus our company's validation engine error
When you create a class derived from Exception[^] there are a number of constructors[^] that you can override. One of them[^] accepts a message (which your validator engine can produce) and another Exception object. This will be exposed as the InnerException of the Exception that is being thrown.
Is this what you are looking for?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
-- modified at 7:20 Wednesday 17th May, 2006
|
|
|
|
|
how will get last affectecd row in a table
if u using @@identity it is working in SP
Without using SP or any
while we insert as a sql command as a string, and use executenonquery method will executed
this scenario how will get the last affected row from a table
thanx
-
|
|
|
|
|
This will still work whether you are using a stored procedure or not. Try it in Query Analyzer and see.
rfebin2001 wrote: while we insert as a sql command as a string, and use executenonquery method will executed
this scenario how will get the last affected row from a table
I don't understand. Do you mean you want to get value from @@IDENTITY returned to the .NET code that executed the SQL?
You could use SELECT @@IDENTITY and call ExecuteScalar() in the .NET code.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Without using any extra query, or SP how will get the last affected row in that table
-
|
|
|
|
|
NICE TO MEET wrote: Without using any extra query, or SP how will get the last affected row in that table
What is the different to your .NET application by putting two queries into one SqlCommand object? Or adding to the stored procedure the SELECT @@IDENTITY ?
cmd.CommandText = "INSERT MyTable(Column1, Column2) VALUES ('ABC', 'DEF'); SELECT @@IDENTITY;";
int primaryKey = (int)cmd.ExecuteScalar();
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
How much the maximum size of XML we can pass to SQL Server to do the transact SQL Operations
Tell me Pls
thanx
-
|
|
|
|
|
Hi
My table has composite pk, when i want to select based on one key i write
select * from table where col1 = 'val1' and col2 = 'val2'
when i have more then one pk like (val1, val2), (val3, val4), ...
how can i write select with in so that i can get rows satisfing all the conditions.
Shajeel
|
|
|
|
|
select * from table where col1 in ('val1', 'val2') and col2 in ('val3', 'val4')
|
|
|
|
|
if will give me four combinations
val1 and val3
val1 and val4
val2 and val3
val2 and val4
but i want only two combinations like here i just want first and third condition.
Shajeel
|
|
|
|
|
you put dummy data in table then check the query will work fine...
|
|
|
|
|
suppose i have a table
Color Shape
Red Cirle
Red Square
Yellow Square
and i want 2 records of (Red, Circle) and (Yellow, Square)
your command will return me 3 records out of which i dont want middle one.
Thank for taking interest
Shajeel
|
|
|
|
|
you can simply use:
<br />
select * from table <br />
where col1 IN('val1' , 'val2') and col2 IN ('val3' , 'val4')<br />
it will work...
Javed
|
|
|
|
|
Now i have an Xml like this
11<Root>
11 <Element>
11 <Table1 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table2 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table3 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table1 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table2 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table3 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table1 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table2 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table3 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table1 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table2 Value as XML attributes/>
11 </Element>
11 <Element>
11 <Table3 Value as XML attributes/>
11 </Element>
11</Root>
The above xml having 3 different table values in 4 set of nodes to update 3 tables by using open XML
How will u achieve this target
The above XML nodes are stable in all times as 3 elements
//////
Is it possible to change as 4 elements and update to 4 tables at run time
This second scenario how will the stored procedure will update the 4th table
The stored procedure is created for first scenario to update 3 tables
Can i possible to achieve my second target by the same procedure
Tell me the suggestions
thanx
-
|
|
|
|
|
Can u guide me to do a bulk update into more than one table from getting a single xml ine the form of attribute centric and element centric mapping, Tell the procedure to create the stored procedure itself, now i am having XML as a string to update a table
Reply with Source Pls
Thanks
-
|
|
|
|
|
I have one stored procedure, and it having UPDATE and INSERT statements, The INSERT / UPDATE queries are inside a Begin transaction, if the transaction fails then rollback the transaction otherwise commit it.
If the error occur rollback the transaction as well as i want to catch the exception and throwuh it to the user in the DA Class
I am calling the stored peocedure in the DA Class
please tell me any suggestions
Awaiting for reply
thanks
-
|
|
|
|
|
What was wrong with the previous answers[^] you received. If you are looking for more information then what information do you need? If the question was misinterpreted then repeating the exact same request will not assist those who are trying to help.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Hi,
i have 2 tables. Both have the same structure.
i want queries which compares
1) each and every row of the first table to the corresponding row in the 2nd table. Here, it should retrive the row which is not matching in both the tables. the comparison should be check each and every column in both the tables
2)the rows that are present in first table and not in 2nd table and VICE-VERSA
Please reply ASAP
Vishal
-- modified at 2:27 Wednesday 17th May, 2006
|
|
|
|
|
This will return all rows in Table1 that are different or missing in Table2
SELECT *
FROM Table1 AS t1
LEFT OUTER JOIN Table2 AS t2
ON t1.PrimaryKey = t2.PrimaryKey AND t1.Column1 = t2.Column1 AND t1.Column2 = t2.Column2....
WHERE t2.PrimaryKey IS NULL To get all the rows in Table2 that are different or missing in Table 1 replace the LEFT OUTER JOIN with a RIGHT OUTER JOIN and change the WHERE clause to test t1
Does this help?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
This is certainly helpful. Thanks a lot
Now, is there any way we can display additional information for "actually which columns the data is not matching" ?
Vishal
|
|
|
|
|
Hi Vishal!
Take a look at my blog "Compare the content of two tables" at http://www.cubido.at/Blog/tabid/176/EntryID/77/Default.aspx. It describes how this can be done with a tool that comes with SQL Server 2005.
Regards,
Rainer.
Rainer Stropek
cubido business solutions gmbh
Email r.stropek@cubido.at
Visit my blog at http://www.cubido.at/Blog/tabid/176/BlogID/4/Default.aspx
|
|
|
|
|
Hi,
I have one table that table contains n-rows
now i want to get one column in each row ,how can i achieve this
|
|
|
|
|
SELECT ColumnName FROM Table
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Hi,
Please help me by providing some information/code snippet on the following
1)How I can copy/retrieve the data which is stored as image type in sql table.T
he contained data may not be an image it may be a word file also.
Using sql queries how I can get back this data.Please show me the right way.
Thanks very much.
Thank You,
Rahul.P.Menon.
|
|
|
|
|
Hello, I am trying to develop a program that uses data from a DBMS. But the problem is that I don't know which one(DBMS) I should use. The program is going to handle a couple of tables with a few thousands of records each. I have in mind MS-ACCESS and MySql but recently I discovered FIREBIRD which is released under the GPL licence(completely free to distribute with my software or at least this is what I understood).I am new to theese matters so please I need your advise...
|
|
|
|