|
On the Oracle website you should be able to find the 'Instant Client' which is around 25Mb.
|
|
|
|
|
I'm modifying a program (oQuery) that I found on this site so that it will allow updates too.
My problem is how do I do an update using some generic query execution. My problem comes up when I try and get the number of rows returned. So how can I tell that the user just did an update and then find out how many rows were affect by that update?
<br />
mssqlComm.CommandType = CommandType.Text<br />
mssqlComm.CommandText = sqlQuery 'this is the query from the user<br />
mssqlComm.Connection = mssqlConn<br />
mssqlcomm.ExecuteNonQuery()<br />
<br />
mssqladpt = New SqlDataAdapter(mssqlcomm)<br />
mssqlds = New DataSet<br />
mssqladpt.fill(mssqlds)<br />
Thanks
Tom
Tom Wright
tawright915@gmail.com
|
|
|
|
|
ExecuteNonQuery returns an integer value that indicates how many records were affected by the query being executed.
Paul Marfleet
|
|
|
|
|
Colin must be asleep...
Tom Wright wrote: sqlQuery 'this is the query from the user
I assume you're parsing this string to check for any kind of SQL injection attack ? Accepting raw SQL and running it blindly is a real recipe for someone to wipe your DB on you.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I need add some hour(or second to be more exact) with a date field(using dateadd),
but I can only count business hour between 08:00 am and 06:00 pm.
for example:
we suppose the following paramters below.
date_field: 10/16/2007 05:00:00 pm
hour: 2:00:00
if I use dateadd(hh,hour,date_field), I will have 10/16/2007 07:00:00 pm. right?
but I can only count business hour between 08:00:00 am and 06:00:00 pm.
the date/time would be "10/17/2007 09:00:00"
I need to do a function in sql that return the result of this add.
sorry, my english is poor yet, I'm from brazil. Do you understand my doubts?
can someone help me?
|
|
|
|
|
As far as I know, there is no direct way to do this in SQL Server.
You should do by making a user defined function or in your application logic.
|
|
|
|
|
how can i store my select statment result in one variable
"Select Into"
i don't want to use cursor.
my select statment returns one value only
thx
|
|
|
|
|
SELECT @variable = column FROM table
or
SET @variable = (SELECT column FROM table)
The first enables you to set multiple variables in a single statement, and has no problems with multiple rows being returned - the variables are set to the values in the last row returned. SET will raise an error if more than one row is returned.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
DECLARE @variable datatype
SELECT @variable = column FROM tablename
Regards,
Sandeep Kumar.V
|
|
|
|
|
Hy
I have 2 databases and one table for each of database. The tables have the same structure. One of them is populate and I want to copy the contain of this to the second table. I want to ask if this is possible with DTS.
thx
|
|
|
|
|
Yes, And You can check the (DTS Export/Import Wizard) section of this article[^].
|
|
|
|
|
But I want to do that with C#
|
|
|
|
|
mihksoft wrote: But I want to do that with C#
Check this link[^]
|
|
|
|
|
You can do this with DTS - however I would advise just writing a stored procedure or an adhoc script to do a select from one table to insert into the other.
The reason I mention this is that DTS packages with all their VBScripting etc can hide a lot of their functionality.
From a maintenance point of view this can sometimes make it very difficult to see what is going on.
One more issue is this - SQL Server 2000 DTS packages don't like temporary tables in their data pumps(I don't know about 2005), you can use them but you have to be wily in how you use them.
You always pass failure on the way to success.
|
|
|
|
|
i write like this:
SELECT *
FROM TB_ANGEL
ORDER BY angel ASC
but i want not only query by order, i also want update the table by order
thanks a lot
wuhuaiji
|
|
|
|
|
Records in the table are physically sorted in the order of the Primary key Column by default. You can't update the order of the records programmatically.
Regards - J O N -
|
|
|
|
|
Actually they are physically sorted in the order of the clustered index information - that's what 'clustered index' means. However, it is the default to build the index supporting the primary key as the clustered index. Tables without a clustered index are not sorted and are referred to as 'heaps'. Specific rows in a heap are referred to internally using row identifiers which give the physical location of the row, but this information isn't available to clients.
If you wish to update a specific row, you need to include some kind of row identifier within the table such that each row has its own identifier.
SQL Server 2005 does provide the RANK function which might prove helpful for updating an ad-hoc query.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
thanks a lot
wuhuaiji
|
|
|
|
|
hi
How to Convert a project which is using database as sql 2000 and now i want to convert this project which uses sql 2005 using asp.net.
Can any one help.
mallika
|
|
|
|
|
If you run your DB Scripts on a SS2005 DB, or import your existing DB into it, odds are high it will just work.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how can somebody use the while loops in the stored procedure.the problem is i have ten records and one by one , i have to access all the 10 record .
How should i do it?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
If you want to process data row by row then you will need to use cursors but generally they are slower then set based solution so you should avoid them
|
|
|
|
|
Posting more details can help us helping you,
Do you have these records in local or temp table?
Why do you want to access them sequentially?
|
|
|
|
|
Using click once i can update my application on the users machine easily, but when i make database changes, i need the database to also be updated...is there a way to integrate SQL Server 2005 into the click once process without trashing the users existing data?
Thanks in advance for any help!
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Hi.
For the last 14 days i have been struggling with design pattern (T-SQL / Tables) for cascading product variants in a E-Commerce solution ("value-pairs pattern" / "diamond pattern"). I did find this DB diagram from IBM (http://publib.boulder.ibm.com/infocenter/wchelp/v5r5/topic/com.ibm.commerce.developer.doc/refs/rdmattribute.htm), which seams to be a good table design.
My problem is, that i cant figure out how, to make the SELECT statement for each cascading selection. Attributes should be selected in a specified order, each dropdown below is disabled until the previous selection is made.
Table design is like this:
"Product"
"ProductAttribute" (Relates each combination (T-Shirt, Small & Red) to a ProductID ..... AttributeID > ProductID)
"Attribute" (Relates "AttributeType" and "AttributeValue" together)
"AttributeType" (Type, Size, Color)
"AttributeValue" (T-Shirt, Jeans, Jacket, Small etc)
If i have 3 drop downs, with the following options:
Dropdown #1 (Type): T-Shirt, Jeans, Jacket
Dropdown #2 (Size): Small, Medium, Large, Extra Large etc.
Dropdown #3 (Color): Red, Green, Blue, Purple etc.
When the user selects a Type, Dropdown #2 is enabled and populates with possible values for Size. The problem is, how to make a T-SQL that only selects the available sized with the type "T-Shirt".
There is not limitation on how many Attribute each product can have. So a product could have X amount to attribute selections (dropdowns).
Thanks in advance
mm98 - Denmark
|
|
|
|