|
Downvoting ??? i didnt... i set the first answer to "Did not help"...
With great code, comes great complexity, so keep it simple stupid...
|
|
|
|
|
Hi, I have Picture object in .NET, I need to save it in Direct Text based query like,
"update table set picimage = " & ObjectName & " WHERE code = '111'"
What is the way.
|
|
|
|
|
|
hi all,
I want to open my back up database into other client systems.
Clearly I did one of my database into back up...that back up file open into others systems .
|
|
|
|
|
I am having kinda the same problem as the one already mentioned here:
Connection Pooling nightmare[^]
This is what's happening for me. Suppose that I've got a connection pool with minimum size of 10 and maximum size of 50. I'm monitoring the connections to database using SP_WHO stored procedure as well. When the first request is made to the web site, I can see that 10 connections are created in the pool. The thing that is confusing me is that by making a few subsequent requests, new connections are added to the pool even though all of 10 initial connections are in 'sleeping' mode and 'AWAITING COMMAND' as executing SP_WHO tells me. By executing subsequent calls to database the size of pool grows until it reaches the maximum number of connections (say 50). From this point on, any attempt for connecting to database results in the following exception:
DAL:Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool.
This may have occurred because all pooled connections were in use and max pool size was reached.
This is happening while there are 50 connections in the pool whose status is 'sleeping' and AWAITING COMMAND.
I'm using Microsoft Enterprise Library (which I think automatically handles closing connections for me), and wherever I use DataReader, I am closing it in a finally block.
Am I missing something? Please somebody help me!
_
|
|
|
|
|
Are you using your own connection pool or the built in connection pooling (that happens transparently)?
Are you connecting using multiple SQL accounts (this will prevent connections being used by multiple accounts).
Are you disposing of all resources?
Are you actually using any of the features of the EL? (Apart from ExecuteDataSet).
|
|
|
|
|
I think I've found the problem. One of the data access functions was acquiring a DataReader without closing it. I don't know why I hadn't see it so far
Thanks for your help though
_
|
|
|
|
|
Are you certain the connection strings are identical - even the case of individual letters matters. ANY difference will cause a new connection.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I think I've found the problem. One of the data access functions was acquiring a DataReader without closing it. I don't know why I hadn't see it so far
Thanks for your help though
_
|
|
|
|
|
table
id val
1 11
2 22
3 33
4 44
6 55
Take MA3 for example, I wrote one, but not fast enough for draw the MA line, here it is:
SELECT a.id,ma=CASE WHEN a<2 THEN NULL ELSE AVG(b.val) END
FROM table a,table b WHERE b.id BETWEEN a.id-2 AND a.id GROUP BY a.id
Thanks in advance.
More local variables mean higher cohensive
Less function parameters mean looser coupling
|
|
|
|
|
Hi all..
I have an application which is having 2 servers.
client is having his own server and we are maintaining another server for online transactions.
when internet connection fails at client side,client is allowed to perform transaction at his place and we need to synchronize the database of both client side and server side when connection gets active.
can you one give me suggestions...
if the post is not clear.. i will give you in details..
Thankyou...
siri
|
|
|
|
|
Not sure whether Biztalk can solve ur problem...
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Using merge replication is one choice.
The need to optimize rises from a bad design
|
|
|
|
|
HI
Can any one let me know, how to sort on cloumn with text data type in SQL Server 2005, thanks in advance, kindly Reply ASAP.
|
|
|
|
|
select * from table order by columnname asc
or
select * from table order by columnname desc
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
you can not sort column with data type text with order by ASC or DESC, Even group by cann't be use, is there any other wat i can sort the column with the data type text. thankx for ur reply.
|
|
|
|
|
Have a look at SUBSTRING .
I believe that you would have gotten far more answers if you wouldn't have requested to reply ASAP. That's considered rude.
The need to optimize rises from a bad design
|
|
|
|
|
Hi
I want to execute below query in ms-sql server 2000 but its giving errors.
Can anybody help please.
select * from ( select vRefTable from mainmenu where iMenuId=58 )
where (select vFieldsName from TableField where iMenuId=58
and bIsPrimary=1 and iTableFieldId=11) = 1
Its showing below errors. your help is greatly appreciated.
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'where'.
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '='.
Thanks
Ansari
|
|
|
|
|
Well, I am not sure what are you trying to say with that T-SQL code but I think your query looks like this:
<br />
select * ,<br />
( select vRefTable from mainmenu where iMenuId=58 ) <br />
from TableField<br />
where vFieldsName iMenuId=58 and bIsPrimary=1 and iTableFieldId=11
For more help post more descriptive question.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi
I have tried to analyse my requirement below.
mainmenu--TableName
iMenuId vRefTable----ColoumnNames
58 news ---------Records
TableField
iMenuId bIsPrimary iTableFieldId vFieldsName
58 1 11 iNewsId
news
iNewsId vTitle vUR
1 news1 http:
I am storing tablenames in MainMenu in vRefTable coloumn and coloumn names in vFieldsName of TableFields table.
I want to extract tablename from MainMenu whose iMenuId=58 and coloumn name from TableField table whose iMenuId=58 and bIsPrimary=1 and iTableFieldId=11 i.e iNewsId. After this I will be having both table name and coloumn name, using this I want to extract data based on the table name & coloumn name which I am having.
Thanks again
Ansari
|
|
|
|
|
Well, I'm not sure what you are trying to acheive, and in my opinion its a rubbish way of doing it, but your problem is (I think) that you need to alias you sub-selects.
select *
from ( select vRefTable from mainmenu where iMenuId=58 ) as a
where (select vFieldsName from TableField where iMenuId=58and bIsPrimary=1 and iTableFieldId=11) as b = 1
But I still think you should re-write it
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi,
i display edit procedures (add/delete/edit) in datagridview.
Is it ok (do people often) display report procedures the same way? not in crystal reports?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hi,
A customer gave me his database which is in Paradox and secured by a password.The problem is the Arabic data appears unreadable.When I open it in Office Access it appears unreadable.If I copy the arabic data to outlook message and send it to my self then open it in outlook and change the encoding to Arabic(Windows) it appears correctly.I changed the aspx page encoding to Arabic(Windows) encoding but the data stiil unreadable.
Then I used a paradox viewer which displayed the arabic data correctly but only for 100 records(It show 100 records only may be because it is a Demo).
The customer will come tommorow to see his database with relations between them and I still don't know how to solve this problem.Do any one know how could I solve this problem?
I am too late but i will never give up
|
|
|
|
|
I'm working on a app that will act as a front end to a SQL Server Db. Originally the db was in Access and I used the migration wizard to move it to SQL Server. Subsequently I made changes to the schema on the SQL Server. Nothing radical, I added a few extra look up tables, extra foreign keys things like that.
Now, I have to come up with a way to transfer data from the original schema into the new schema. I was hoping I could have a menu option "Import data" where the user selects an Access file and all the data from that file is loaded into the (presumably) empty SQL Server Db.
However, I'm not sure how to do that. My project is in C#, with which I'm very familiar, but I do not have experience with the different SQL Server packages. I'm currently looking into SSIS, but I'm not sure if that's the way I should go. Should I use DTS instead ?? I also found the Microsoft.SqlServer.Management.Smo.Tranfer class that seems to copy and modify schemas programatically.
Any ideas ??
|
|
|
|
|
Could you clarify a little bit (schema in SQL Server is not the same as schema for example in Dataset).
Is the situation that you want to transfer data from Access file (pointed by end user) to a similar (but not equal) structure in SQL Server and perhaps create the structure on the fly under predefined schema (owner)
or
do you want to move your existing tables in SQL Server under a different schema (owner) in the same database?
Mika
The need to optimize rises from a bad design
|
|
|
|