|
I am planning on using a CLR stored procedure to encapsulate information in a wrapper object and place this on an MSMQ private queue. My problem is that I can’t add System.Messaging as a reference. I understand that this restriction to ‘approved’ assemblies only can be worked around by creating my assembly as UNSAFE in SQL Server, but does this mean that I have to dynamically load System.Messaging?
|
|
|
|
|
how can i register oracle provider in debug
can any body help me plz.
and when ever i press f5, it says an error like unable to start debugging.
aslam
|
|
|
|
|
|
I have written a program to archive user reports to a temporary area and then deleting them after a set number of days.
This program works fine on our Local Area Network, but it cannot connect to an SQL Server which is in the DMZ. ASP.NET programs do not seem to have any trouble.
My program is written in C++ and Classic ADO.
My connection details are as follows: (written as VB as this is probably the most familiar)
Conn.Mode = adModeReadWrite OR adModeShareExclusive
Conn.CursorLocation = adUseClient
Conn.ConnectionTimeout = 15
Conn.CommandTimeout = 128
Conn.Provider = "sqloledb"
Conn.ConnectionString = "Data Source=TheServer;Initial Catalog=TheDB"
Conn.Attributes = 0;
Conn.IsolationLevel = adXactReadCommitted
Conn.Open( , UserNameVar, DBPasswordVar,adConnectUnspecified)
|
|
|
|
|
I'm using VB 2005, and sql databse.
I have a form with 4 textboxes: barcode_textbox, id_textbox, name_textbox, stock_textbox and they are connected to database table called "PRODUCTS"
Now when i add new record, and enter barcode that already exist in database, i want it to only add stock_textbox to that record in database!
How can i do that?
|
|
|
|
|
Do a check to see if the barcode exists, and if it does just update it. You can do this using a SELECT COUNT or IF EXISTS or whatever.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i using Free SQLyog GUI v5.02 to save data for my asp.net web application. I need to addin rollback feature so while the system is fail during updating,adding and deleting data, the system can back to original(before perform the action).I am fresh for SQLyog, so have any setting at SQLyog for rollback or any idea or technique to perform this feature ? thanks !
Best regards,
Chee ken
|
|
|
|
|
No body reply me ?
Best regards,
Chee ken
|
|
|
|
|
Hi
I am programmatically creating SSIS package. I know to create db to db and db to flat file. I dont know how to create SSIS pacakge programmatically from Flat file to Destination DB. Could any one help me to solve my problem please.
kesavan
|
|
|
|
|
Help!
I have a table with a column named "Device Names" and a column named "Total Calls".
I want to COUNT these columns and display the top 10 devices according to the device names. How will I go about doing this?
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
select top 10 DeviceName, sum(TotalCalls) SumCalls
from MyTable
group by DeviceName
order by 2
|
|
|
|
|
I want to wight a programm in (VB.net C#)for data transfer Client to Web Server; i have bulck data on my Client PC and i want to Upload all Data on Web Server less time consuming. (using C# code)?
Can somebody hepl me ????
please give me a right solution with well manar.
Pavan Pareta
|
|
|
|
|
Hi All,
I have been using full text search(Sql Server 2000)in my application for search purpose.
But on certain words i.e Noise words such as And,after,about i am receiving the following error:
Execution of a full-text operation failed.A clause of the query contained only ignored words.
I tried a lot to sort out this issue,but this is going to be out of my scope.
If anybody can help me then it would be really appreciable.
Thanks in Advance,
Vivek Rathore
|
|
|
|
|
Hello, I am using VB Net(2003). I’m asking questions, Namely: Here I have a data base under Access in the name of Invent.mdb, which contains 2 tables TreeviewItems and Products. The Products table has close to (1000) recordings and about (30) fields. On my (Form1) are TreeView, DataGrid and ListView. Operation Mode : At the starting, load the treeView with the TreeviewItems table, and on a node click of the TreeView it fills the Datagrid, and upon a new node click from the same Treeview it does empty the DataGrid and does re-fill it. It does that as long someone clicks on a treenode. Up to here all ok, I have a (2e) form (Form2) which opens on a click of button, this form contains Textboxes which are automatically fills (Data Binding of Data Grid Form1) here my question I would like to be able to add, modify, to remove recordings from my table Products, as I mentioned at the beginning, the Products table contained nearly 1000 recordings. thus Ref_ID column is label from 1 to 1000, assume to illustrate this example that DataGrid contains 32 recordings and which have for Ref_ID the reference label 110 to 142 and since that fields is the primary key which autoincriment . If I want to add a recording it will thus have the number 143 and at the time of the update how that will be done it cannot y have doubled blooms. See my dilemma, I hope to have been rather precise and that that someone will be kind enough to help me to see clearly. Thank you and waiting for advice.
|
|
|
|
|
andy38 wrote: thus have the number 143 and at the time of the update how that will be done it cannot y have doubled blooms
The ID should be set as an identity field in the database, when you create one, the data base should assign and return the ID. Your user should never enter it in, and it may not even be appropriate for them to see it or know it's there.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have a question in regards to dynamically creating a cross tab query in sql server 2005. I have a table that contains the attributes of a product see below and I want to format is so that the outputs the product attributes to different columns with the corresponding values. I am using sql Server 2005 and have seen examples with using PIVOT function which does similar to what I want but they all the examples seem to use in circumstances where it is required to aggregate values in a column eg, sum a sales figure.
I could create a separate query for each attribute of a product and then use a join to get my result but this is not dynamic, i.e. if I add a new attribute I would have to change my query.
Can anyone help?
Before
Product Attribute AttributeValue
Apple Color Red
Celery Color Green
Banana Color Yellow
Apple Type Fruit
Celery Type Vege
After
Product Color Type
Apple Red Fruit
Celery Green Vege
Banana Yellow
|
|
|
|
|
can any one tell me, i got error like this
when i press f5 , it says unable to start debugging,then i run without debugging.
error:The 'oraoledb.oracle' provider is not registered on the local machine.
aslam
|
|
|
|
|
Looks like you need to go into debug mode, and register your oracle provider.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi all,
Here's a situation. I have table A which has several subclassed tables, say A1, A2, and A3. Table A has a primary key named foo which will only exist once in one of the subclassed tables. Now, I want to do a select statement to grab foo from table A and where ever it might be in the subclassed tables. Is it possible to write a single select statement instead of having to write 3 seperate select statements to get to the subclassed data?
Thanks,
Keith
|
|
|
|
|
You would normally use the following:
select A.*, A1.*, A2.*, A3.*
from A
left outer join A1 on A1.id = A.id
left outer join A2 on A2.id = A.id
left outer join A3 on A3.id = A.id
where A.id = 'foo' This will only return one row - the outer joins will either return proper field values (for the appropriate sub-class table) or nulls (for the inappropriate ones).
Regards
Andy
|
|
|
|
|
Thanks, Andy. That seems to do the trick. I'm curious though, as you add subclassed tables, would performance degrade significantly? I'm using SQL Server 2000. I'm not too worried about performance right now but it's something that would be good to know.
Thanks,
Keith
|
|
|
|
|
As long as each of the tables involved have a unique index or PK constraint (preferably clustered) specified on the key column the query should perform well. I would say that the problem comes with the maintenance effort required to add subclassed tables to all of your queries. I try not to overuse this design for that reason, rather than for performance.
An alternative common design that may perform better would be to merge all of the sub-classed tables into the ancestor table.
If you are worried about performance and encapsulation then you might consider using a hybrid of the two designs - so that the most commonly-used information is merged into the ancestor table, with the sub-classed tables only required in exceptional cases.
Like many design decisions - there is no right or wrong answer
Andy
|
|
|
|
|
I totally agree about the maintenance issue that arises from having so many subclassed tables in such a query. I began to explore a different path and ended up not going with huge query that you suggested. I'm trying my "bestest" to do an n-tier approach and that huge query didn't fit right with what I had. Though who knows if I'm doing it close to right. lol
Thanks again.
Keith
|
|
|
|
|
hi all
I have an table
CREATE TABLE [MultyItemsTab] (
[MultyId] [int] IDENTITY (0, 1) NOT NULL ,
[SingleId] [int] NOT NULL ,
CONSTRAINT [PK_MultyItemsTab] PRIMARY KEY
(
[MultyId],
[SingleId]
) ON [PRIMARY] ,
...
)
GO
And i want to save into one xml-based data
<br />
...<br />
set @txt = '<ROOT> <Style SingleId="0"/><Style SingleId="1"/> </ROOT>'<br />
<br />
EXEC sp_xml_preparedocument @idoc OUTPUT, @txt<br />
<br />
insert into MultyItemsTab select * from openxml(@idoc,'/ROOT/Style',0) with (SingleId int)<br />
<br />
...
And as a result in a table added 2 rows;
-----------------
MultyId-------------SingleId
0-------------------0
1-------------------1
But actually i want what MultyId indent not increase when add rows to this table at once.
I mean what desirable result is:
-----------------
MultyId-------------SingleId
0-------------------0
0-------------------1
How i can do this????
THANKS
-- modified at 10:16 Thursday 1st February, 2007
|
|
|
|
|
Calling by the other way:
Is it possible to call a stored procedure WITH PARAM from .net WITHOUT using "AddParams" ? I mean we should be able to call(exec) the SP just like we do in the query analyser. I'd construct the string like "sp_testproc '111','RR',23'". and execute it as nonQuery. Is there any way? please help.
*
|
|
|
|