Multiple ADOQuery On Same Connection, Performances Go Down Because Of Serverside Cursors...
Oct 12, 2006
Hi everyone,
I am coding under Delphi a software which will be using a SQL Server 2000. I am using ADO components and have the latest MDAC: 2.8 SP1.
The software is using a lot of TADOQuery objects which are connected to the same TADOConnection.
The TADOQuery having for options :
- cursorlocation : useclient
- cursortype : static
- locktype : optimistic
On the first use of a TADOQuery in order to execute any type of request, the processing is fast.
If I am using this same object for others requests, everything is fine and as fast as the first request.
But as soon as I am using another TADOQuery, performances are going down.
In order to give some numbers, some requests can take as much as 17 seconds to be executed. The same request would take at most 100 milliseconds if it were executed with the first TADOQuery.
It is not a problem concerning indexes; if I try to use the request analyzer, all my requests are processed quickly.
I used the SQL Profiler to see the details and saw some interesting things :
the first uses of TADOQuery are of type SQL:BatchCompleted
but switching to another TADOquery make it use another type : RPC:Completed.
Contents of this RPC can be a declaration or an execution of cursor.
More precisely, if I am using only one ADOQuery, I see one line in the Profiler for every block of code opening/reading contents/closing.
But using multiples ADOQuery, I see one declaration of cursor for the opening and then every reading produces one cursorfetch.
So, this declaration of cursor may take a long of time and every fetch too and if there is many lines to send to the client, the network is used for each line to send.
Better, using an TADOQuery to make a request and then simply initializing another one by changing the SQL property and then executing a second time the first TADOQuery makes this last execution used as a cursor serverside.
The problem should then on the side of the client but I can not figure where.
I hope having been as clear as needed !
My wishes is to not have recode the whole database side of our software because it is huge and badly designed so it will be hard to test everything fine.
So before recoding I wish to continue the analysis.
So does anyone knows why is happening this serverside thing ?
And is there a simple way to make it not happen ?
Thanks to everyone for any future help !
View 1 Replies
ADVERTISEMENT
Feb 28, 2008
I need to write an if statement for a serverside control which is the listview. I know how to write a statement in vb but clueless as how the syntex is for asp.net.
If listbox.text = "Animals" then
SelectCommand="<Select [website_name], [link] from suggestion_box where rating = 1>"
if listbox.text = "Shoes" then
SelectCommand="<Select [website_name], [link] from suggestion_box where rating = 1>"
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
</asp:SqlDataSource>
View 1 Replies
View Related
Jan 19, 2006
i was experimenting with ado and have come across the following problems:
i've two forms one of which is a main form and the other is a form containing the adoquery1 and grid to display the results of a query.
On running a query and displaying the results if, i close the second form containing the grid and adoquery1,while the query is still running i get a error saying that i cannnot perform the operation an a closed dataset and futher if a say ok to the message it givies me a read address exception error.
i have traied to trap the first error about the dataset but the second error about the read address givies me problem.
You advise is much appreciated in this problem.
View 1 Replies
View Related
Oct 11, 2007
will my fetches on a cursor continue seamlessly even if deletes and multiple commits are occuring on the underlying source table? I want to make sure the cursor will not lose it's place as I believe some older dbms's did.
View 11 Replies
View Related
Apr 13, 2006
Hallo everbody,
I'm having a serious problem with my aspx pages. I
developed few pages that allow users to retrieve books information from
a database (MS SQL). The database table contains about 5000 records.
My queries are very simple, nevertheless the time necessary to perform them is extremely long.
I tried to set the time out of the data adapter to 0 and I removed the
debug mode (debug="true") from the web.config file. I'm still not able
to perform a query.
What is wrong with it? Is it something related with the database?
Any help is appreciated...
Thanks,
christian
View 5 Replies
View Related
Jun 15, 2008
Hello,
Lets consider two tables : CUSTOMERS and ORDERS.
I would like to know which of the following query is the fastest:
select * from customers C
where exists (select 0 from ORDERS O
where C.Name like 'A%' and O.Charged = 1)
select * from customers C
where exists (select 0 from ORDERS O
where O.Charged = 1) and C.Name like 'A%'
I don't want to use a JOIN clause. I just want to know if there is a difference of efficiency when the condition on C.Name is inside or outside the sub query.
Thank you in advance for any advices,
regards,
mathmax
View 2 Replies
View Related
Jun 16, 2008
Hello,
I would like to know which of the following query is the fastest:
select * from customers C
where exists (select 0 from ORDERS O
where C.Name like 'A%' and O.Charged = 1 and O.Customers_Id = C.Id)
select * from customers C
where exists (select 0 from ORDERS O
where O.Charged = 1 and O.Customers_Id = C.Id) and C.Name like 'A%'
Because the condition C.Name like 'A%' is inside the sub query, I'm wondering if it will be evaluated for each record of the Orders table. Does anyone know if there is a difference of efficiency when this condition is inside or outside the sub query ?
Thank you in advance for any advices,
regards,
mathmax
View 1 Replies
View Related
Jun 15, 2007
Hi to everyone!
I've just started to learn MS SQL Server 2005 and I hope you can give me some advices about what is the best design for the max performances between the two cases:
Case 1:
Single table, but not very scalable
Table name: GS
salary_id (primary key, int)
salary_description (varchar)
salary_cumulative_1 (int)
salary_cumulative_2 (int)
..
salary_cumulative_9 (int)
Case 2:
Two tables, this removes the limit of having only 9 salary_cumulative field, but will be performance worst? Keep in mind that this table(s) will be queried a lot the whole times when the user use the application.
(1) Table name: GS
salary_id (primary key, int)
salary_description (varchar)
(2) Table name: Cumulative
salary_id (primary key, int), foreign key
salary_cumulative (varchar)
Thank you a lot for your time!
ps: Can you also please tell me if using long (very long) names for the tables name will decrease the performances too?
Greetings,
Mirto
View 4 Replies
View Related
Apr 23, 2007
Hi all,
I know that the File connection can be used in the File system task and Flatfile connection can be used in Flat File source or destination, but I don't know which Task or Source/Destination can use the Multiple File connection and Multiple Flatfile connection. Thanks
View 3 Replies
View Related
Apr 11, 2007
Hello,
I've written this stored proc, which have to collect records in one table in several databases. These tables contains very few records (1 to 10 max). In SQL Server standard edition, this stored proc is executed instantaneously. But in the Express, it could take 1 minute.
Is there a solution to this problem ?
Thanks in advance,
Best regards,
Guy
ALTER procedure [dbo].[SP_CHECK_USERS]
AS
select 'FIDUCIAIRE' as code,moment,nom,machine from MERCATORFIDUCIAIRE.dbo.sessions s1 where (s1.inactif=0) and (s1.nom<>'MercatorIshop')
union select 'TEST1 ' as code,moment,nom,machine from MERCATORTEST1.dbo.sessions s2 where (s2.inactif=0) and (s2.nom<>'MercatorIshop')
union select 'TEST10 ' as code,moment,nom,machine from MERCATORTEST10.dbo.sessions s3 where (s3.inactif=0) and (s3.nom<>'MercatorIshop')
union select 'TEST11 ' as code,moment,nom,machine from MERCATORTEST11.dbo.sessions s4 where (s4.inactif=0) and (s4.nom<>'MercatorIshop')
union select 'TEST12 ' as code,moment,nom,machine from MERCATORTEST12.dbo.sessions s5 where (s5.inactif=0) and (s5.nom<>'MercatorIshop')
union select 'TEST13 ' as code,moment,nom,machine from MERCATORTEST13.dbo.sessions s6 where (s6.inactif=0) and (s6.nom<>'MercatorIshop')
union select 'TEST14 ' as code,moment,nom,machine from MERCATORTEST14.dbo.sessions s7 where (s7.inactif=0) and (s7.nom<>'MercatorIshop')
union select 'TEST15 ' as code,moment,nom,machine from MERCATORTEST15.dbo.sessions s8 where (s8.inactif=0) and (s8.nom<>'MercatorIshop')
union select 'TEST16 ' as code,moment,nom,machine from MERCATORTEST16.dbo.sessions s9 where (s9.inactif=0) and (s9.nom<>'MercatorIshop')
union select 'TEST17 ' as code,moment,nom,machine from MERCATORTEST17.dbo.sessions s10 where (s10.inactif=0) and (s10.nom<>'MercatorIshop')
union select 'TEST18 ' as code,moment,nom,machine from MERCATORTEST18.dbo.sessions s11 where (s11.inactif=0) and (s11.nom<>'MercatorIshop')
union select 'TEST2 ' as code,moment,nom,machine from MERCATORTEST2.dbo.sessions s12 where (s12.inactif=0) and (s12.nom<>'MercatorIshop')
union select 'TEST20 ' as code,moment,nom,machine from MERCATORTEST20.dbo.sessions s13 where (s13.inactif=0) and (s13.nom<>'MercatorIshop')
union select 'TEST21 ' as code,moment,nom,machine from MERCATORTEST21.dbo.sessions s14 where (s14.inactif=0) and (s14.nom<>'MercatorIshop')
union select 'TEST23 ' as code,moment,nom,machine from MERCATORTEST23.dbo.sessions s15 where (s15.inactif=0) and (s15.nom<>'MercatorIshop')
union select 'TEST3 ' as code,moment,nom,machine from MERCATORTEST3.dbo.sessions s16 where (s16.inactif=0) and (s16.nom<>'MercatorIshop')
union select 'TEST4 ' as code,moment,nom,machine from MERCATORTEST4.dbo.sessions s17 where (s17.inactif=0) and (s17.nom<>'MercatorIshop')
union select 'TEST5 ' as code,moment,nom,machine from MERCATORTEST5.dbo.sessions s18 where (s18.inactif=0) and (s18.nom<>'MercatorIshop')
union select 'TEST6 ' as code,moment,nom,machine from MERCATORTEST6.dbo.sessions s19 where (s19.inactif=0) and (s19.nom<>'MercatorIshop')
union select 'TEST7 ' as code,moment,nom,machine from MERCATORTEST7.dbo.sessions s20 where (s20.inactif=0) and (s20.nom<>'MercatorIshop')
union select 'TEST8 ' as code,moment,nom,machine from MERCATORTEST8.dbo.sessions s21 where (s21.inactif=0) and (s21.nom<>'MercatorIshop')
union select 'TEST9 ' as code,moment,nom,machine from MERCATORTEST9.dbo.sessions s22 where (s22.inactif=0) and (s22.nom<>'MercatorIshop')
View 2 Replies
View Related
Jan 22, 2004
Hi all
Pls is there a way to disable users to open mutiple session of an access project file.
Assuming that there is may be a specific database properties to set for above issue
rgds
View 3 Replies
View Related
Jan 8, 2008
I am using Sql 2005 in our different offices at different locations. I need to connect to all my office's database in my main office server where i have installed Sql Studio express. I have VPN connection to all the locations.
If multiple locations are connected to my server (VPN) , i could not add any server(location) to the sql studio express (but i can browse that systems and access the shared folders).
if i have only one location connected thru VPN then i can connect thru Sql Studio to that locations Sql server.
Pls also note that the IP address of the locations may changes frequently as i used Dynamic IP conversion for VPN.
View 3 Replies
View Related
Jul 17, 2006
Hi everyone,
Is it possible to perform a SELECT/INSERT statement with two different connection types? I want to do the "SELECT" statement with data from SQL Server and "INSERT" it into an Access database all in one query.
Sanctos
View 1 Replies
View Related
Apr 11, 2012
I'm working on a DB that will be used in separate physical locations. These DBs will be identical in structure and completely independent of each other. Whilst some tables will retain similar or identical information, there is a large amount of content that will diverge.However, there is a central location that will need to manage these DBs. There will be a requirement from this central location to run reports, often comparing data between them, and to push data into each child location. There is no requirement for the child locations to 'share' information and indeed the volume concerned and the intermittent/low-bandwidth nature of their connections would make this undesirable. If an individual selection of data does need to be shared between I'm happy for it to be uploaded centrally, a decision made, and manually pushed to each child-location.
Which brings me to my real question. Should I try and include composite Primary Keys in many of the tables (to include probably an incrementing number and another field of site ID) so that when I absorb them all back centrally I can put them into one large DB. Or should I keep them as separate DBs in the central location and use some fairly 'normal' mechanisms for mirroring to sites; accepting that this will make running comparisons between them more difficult and potentially more difficult to write interactivity for centrally?
The best 'real world' comparison I can think of is transactions in retail shops. How do these transaction logs get stored centrally when they're all generating individual transaction numbers that are only unique in that location?
View 1 Replies
View Related
Jul 20, 2005
I need to set multiple values for some SQL statements, for exampleSET NUMERIC_ROUNDABORT OFFGOSETANSI_PADDING,ANSI_WARNINGS,CONCAT_NULL_YIELDS_NULL ,ARITHABORT,QUOTED_IDENTIFIER,ANSI_NULLS ONGOin a .sql file, but would like to reset them to their previous settingsagain for other SQL statements. I didn't find anything in books online. Ithought just calling "set" was enough, but apparently not ....Thanks.
View 3 Replies
View Related
May 8, 2008
Hey guys,
I am pretty new to reporting software and I was just wondering in reporting services 2005 when working with multiple datasets and data connection string in order to populate text boxes if the data is a number it is prefixed with SUM at the start of the expression and if it is text it is prefixed with FIRST even though it is just for one value.
I was wondering if this is normal or have I messed up somewhere?
Many thanks.
View 1 Replies
View Related
Feb 13, 2008
I have a simple db that I created in SQL Express 2005, and a small app that I build in Visual C# that connects to the db. The problem I've always had is that Visual C# and Management Studio Express cannot both connect to the db at the same time. One will throw an error if the other is connected. To switch, I have to disconnect the one that has the connection, restart the sql express service and connect with the other. I thought sql express could handle multiple connections? I'm running in User Instance=False mode, and my db properties include Restrict Access=Multi_User.
Does anyone have some insight?
By the way, if I'm not in Visual c# but run the release build of my app, the same problem occurs.
I get this error from Management Studio Express:
Unable to open the physical file "D:DBSHCSHC.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
Thanks in advance.
View 5 Replies
View Related
Jan 24, 2006
I found a peculiar thing today while working with SQL Mobile in a multithreaded application (VS2005, application for Pocket PC 2003).
I created a class which has one SqlCeConnection object. Every time I call a function to insert/select/delete something from the local db, I open the connection, execute the query an then close the connection again.
But when I'm calling a function from the db class in thread 1 and in the meantime call a different function (from the same db class of course) in thread 2, things go wrong. Because when function 1 wants to close the connection, function 2 is still using the connection and it will crash my application with a native exception (0xC0000005: access violation).
I can see why the error is happening, but shouldn't there be a nice .NET handled exception instead of a native exception which grinds my app to a hold?
(A workaround I use now is to use multiple connection objects instead of one, but I thought I'd give this feedback anyway)
View 5 Replies
View Related
Mar 29, 2006
Scenario:
130 dtsx packages using 4 matching connections.
3 of those connections are stored in an SSIS Configuration table in an Operational database.
The last connection is in a shared data source and points to the Operational database so the packages can grab the others.
Problem:
It's time for deployment and all of those connections must change to production servers.
The 3 are no issue, just change the ConfiguredValue in the SSIS Configuration table on the production box to point to the other production servers.
However, the fourth one... I had made an assumption that when you changed a shared data source it filtered down throughout all the packages. We all know what assumptions do to you.... So. I need a way to change all 130 connections (and be able to change ALL packages quickly and simply for other projects in the future)
Solution:
It has been suggested that we use another package to run though all of the packages and change the connection with a script task. I can live with this (and more importantly so can our DBS's who have to deploy).
I have one snippet of code to ADD a connection using a variable holding the connection string, but we dont' want to add one, just change an existing one.
Has anyone else done this? Or had a similar problem and way to fix?
We are likely to have many projects in which the connections MUST change at deployment, and the idea of going into every package to make the change is sad at best... We would be more likely to move back to a competitor's product that has a connection repository, than continue with SSIS.
Ches Weldishofer
ETL Developer
Clear Channel Communications
View 23 Replies
View Related
Mar 10, 2004
I have a query that involves tables from 2 different databases. Using the query analyzer I can construct my query and it works great. Now I am trying to implement the query into my code and I am confused about I handle the connection string(s) since I am now using 2 different databases.
Can anybody help?
Cheers,
AzF
View 2 Replies
View Related
Mar 28, 2006
How does database connection pooling work for multiple "copies" of the same web application on the same server? My IIS 5 win2K server has 32 sites, all pointed to the same code. Each site responds to a different IP/URL(www.a.com, www.b.com, etc.) for SSL reasons. DB is SQL 2000.
Based on perf stats, as a new site spins up, a new pool is created. So when I hit site 1, I see 10 pooled connections. Site 2 bumps it up to 20, etc. However, I don't see it go up to 320, so it isn't linear.
BTW, I'm trying to build a case for having 1 site/application that all URL's point to in order to conserve memory, connection pooling, caching, etc.
Any help is greatly appreciated.
-Allen
View 2 Replies
View Related
Mar 16, 2008
Hi,
I just developed a ASP.NET website with SQL Server 2005 as database. I am having connection crash problem when multiple user click on same link to fetch data from the database. If users click on different links or there is few seconds of time gap between the data access, then it works fine. But the connections crash problem only occurs when 2 or more users click same link at same time.
I am using the following kind of Datalayers to access the data from database:
public static ContentInformation GetContentForUpdate(int ContentId)
{
ContentInformation result = new ContentInformation(); ;
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.Connection = Connection;
command.CommandText = "Content_GetContentForUpdate1";
SqlParameter parameter = new SqlParameter("@ContentId", SqlDbType.Int);
parameter.Direction = ParameterDirection.Input;
parameter.Value = ContentId;
command.Parameters.Add(parameter);
try
{
command.Connection.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
// read the data
}
reader.Close();
}
catch (SqlException ex)
{
Trace.TraceError(ex.Message);
throw ex;
}
finally
{
command.Connection.Close();
}
return result;
}
I would be really grateful if someone can help me out with this problem. Waiting for the soonest reply. Thanks.
View 2 Replies
View Related
Dec 12, 2007
HI,
I am using SqlServer2005 as data base for my web application. I am able to connect to the database through DBCP connection pool . Its working fine for 2 user. When ever 2 users do transaction, it works fine. But 3 users do the transaction, its trowning error.Even i increase the pool size the behavior is same.
error:
com.microsoft.sqlserver.jdbc.SQLServerException: Server failed to resume the transaction, desc: 3f00000002.
For a change I wrote a connection pool to access the DB. I am getting the same error. i.e. Its working fine for 2 user and throws error for more than 2 users.
Is there any setting to be made?
Same application is working fine for Oracle10g.
Regrads
Rupesh
View 1 Replies
View Related
Sep 19, 2007
I am running multiple instance of the same application. This application is connecting to the database and running stored procedures using ADODB (all code examples are taken from msado15).
The problem is that somehow these two applications are sharing something either with the connection or commands.
For instance if the two instances are in the following function at the same time then they both thow an SEH exception:
Code Snippet
inline _RecordsetPtr Command15::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) {
struct _Recordset * _result = 0;
HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _RecordsetPtr(_result, false);
}
The exception that occurs is: "First-chance exception ...: 0xC0000005: Access violation reading location 0x00000068."
And afterwords when they go to release the command an error occurs on
First-chance exception at 0x4de4120c in IpsEngine.exe: 0xC0000005: Access violation reading location 0xcccccccc.
Code Snippet
inline void _bstr_t::Data_t::_Free() throw()
{
if (m_wstr != NULL) {
::SysFreeString(m_wstr);
}
if (m_str != NULL) {
delete [] m_str;
}
}
This is being called from.
Code Snippet
inline void Command15::PutRefActiveConnection ( struct _Connection * ppvObject ) {
HRESULT _hr = putref_ActiveConnection(ppvObject);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
The exception that occurs: First-chance exception at ...: 0xC0000005: Access violation reading location 0xcccccccc.
Similarly when one instance releases a command using
Code Snippet
inline void Command15::PutRefActiveConnection ( struct _Connection * ppvObject ) {
HRESULT _hr = putref_ActiveConnection(ppvObject);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
The second instance of the application fails when running the command at the exact same time.
Code Snippet
inline _RecordsetPtr Command15::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) {
struct _Recordset * _result = 0;
HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _RecordsetPtr(_result, false);
}
The command and connections are not static and there should be completely seperate instances of these for each instance of the application. Does anybody know why this may be happening. Any help would be appreciated. Thanks in advance.
View 2 Replies
View Related
Jul 23, 2005
I am using ODBC (ODBCLink/SE) to connect to HP3000 system;Retrieving the data into Microsoft Excel goes fine usingMicrosoftQuery.But if I try to use SQLServer2000-DTS on Windows2003 to do the import,it always fails and gives the message:"ODBCLINKSE does not allow multiple thread"Does anybody knows how to do that?I need to synchronize data in HP3000 into my database in SQLServer; andI dont see any other ways to do that besides using DTS-scheduled-jobs.Pls help..
View 2 Replies
View Related
Apr 10, 2007
Hi there,
I have a MS Access database (mdb) containing the following tables:
Crime
Criminal
CrimeCommitted
Hideout
CriminalType
The Criminal table contains information about each criminal and the CrimeCommitted table contains information about the specific crimes. I've written the following query to return only the latest crime committed by each criminal:
Code Snippet
SELECT Criminal.CriminalID, Criminal.Firstname, Criminal.Lastname, Criminal.Nickname, Criminal.Gender, Criminal.DOB, Criminal.Eyes, Criminal.Complexion, Criminal.Weight, Criminal.Height, Criminal.Build, Criminal.Scars, Criminal.Occupation, Criminal.CrimeOrgID, Criminal.IQ, Criminal.Hideout, Criminal.CriminalType, Max(CrimeComitted.Date) AS Last_Crime_Comitted
FROM Criminal INNER JOIN CrimeComitted ON Criminal.CriminalID=CrimeComitted.CriminalID
GROUP BY Criminal.CriminalID, Criminal.Firstname, Criminal.Lastname, Criminal.Nickname, Criminal.Gender, Criminal.DOB, Criminal.Eyes, Criminal.Complexion, Criminal.Weight, Criminal.Height, Criminal.Build, Criminal.Scars, Criminal.Occupation, Criminal.CrimeOrgID, Criminal.IQ, Criminal.Hideout, Criminal.CriminalType;
This query works fine for obtaining the Criminal table data, but once i've include CrimeCommitted.Country in the SELECT statement, the data returned contained all the crimes committed by each criminal (i just need the latest crime).
The query doesn't work when another table, other than Criminal, is selected. How can i obtain the columns in the CrimeCommitted table in this query?
View 2 Replies
View Related
Oct 1, 2007
I am facing a reporting service issue.
System information:
1. Our Reporting Server installed on a DB server.
2. We have one windows application which executes on the same server, which generates the reports snapshots.
3. One set of reports with single Shared data source
Scenario:
We have many countries for which report history snapshots needs to be generated. The report information is stored in different databases named as database_CountryCode on the same DB server.
Questions:
1. We need to dynamically change the shared data source connection string to point to the respective country database, when generating the report for that particular country. --> We found out this can be accomplised by using parameterized connection string in report specific data sources in SQL 2005. Can we achive something similar in SQL 2003 Reports as well?
2. We also need to instantiate the reporting service web service in multiple threads, one for each country, where in each thread picks up the corresponding country code, changes the connection string and generates reports snapshots. Can this be accomplished? I know this goes against the entire idea of licensing, but my question is just about feasibility of this idea.
Addnl Info
The CreateReportHistorySnapshot method of reportingservice.asmx returns a snapshotID, which is the timestamp of report snapshot creation. We tried creating the same report snapshot for the same country in 2 threads. Whenever the timestamp for both snapshots was same, only one report snapshot actually got created. Can this be overcome?
View 1 Replies
View Related
Oct 11, 2007
I have excel files where the column headers I care about are on line 5, and the actual data doesn't begin until line 6. Other than deleting the first 4 lines, which is impractical, how can I get the Excel Connection Manager to import the data correctly? I was able to do this under DTS, so I have to imagine it's possible.
Thanks!
View 1 Replies
View Related
Mar 16, 2008
Hi,
I just developed a ASP.NET website with SQL Server 2005 as database. I am having connection crash problem when multiple user click on same link to fetch data from the database. If users click on different links or there is few seconds of time gap between the data access, then it works fine. But the connections crash problem only occurs when 2 or more users click same link at same time.
I am using the following kind of Datalayers to access the data from database:
public static ContentInformation GetContentForUpdate(int ContentId)
{
ContentInformation result = new ContentInformation(); ;
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.Connection = Connection;
command.CommandText = "Content_GetContentForUpdate1";
SqlParameter parameter = new SqlParameter("@ContentId", SqlDbType.Int);
parameter.Direction = ParameterDirection.Input;
parameter.Value = ContentId;
command.Parameters.Add(parameter);
try
{
command.Connection.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
// read the data
}
reader.Close();
}
catch (SqlException ex)
{
Trace.TraceError(ex.Message);
throw ex;
}
finally
{
command.Connection.Close();
}
return result;
}
I would be really grateful if someone can help me out with this problem. Waiting for the soonest reply. Thanks.
View 7 Replies
View Related
Mar 15, 2008
Hi,
I just developed a ASP.NET website with SQL Server 2005 as database. I am having connection crash problem when multiple user click on same link to fetch data from the database. If users click on different links or there is few seconds of time gap between the data access, then it works fine. But the connections crash problem only occurs when 2 or more users click same link at same time.
I am using the following kind of Datalayers to access the data from database:
public static ContentInformation GetContentForUpdate(int ContentId)
{
ContentInformation result = new ContentInformation(); ;
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.Connection = Connection;
command.CommandText = "Content_GetContentForUpdate1";
SqlParameter parameter = new SqlParameter("@ContentId", SqlDbType.Int);
parameter.Direction = ParameterDirection.Input;
parameter.Value = ContentId;
command.Parameters.Add(parameter);
try
{
command.Connection.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
// read the data
}
reader.Close();
}
catch (SqlException ex)
{
Trace.TraceError(ex.Message);
throw ex;
}
finally
{
command.Connection.Close();
}
return result;
}
I would be really grateful if someone can help me out with this problem. Waiting for the soonest reply. Thanks.
View 4 Replies
View Related
Oct 4, 2007
Hi all,
Any idea about how to configure/read multiple worksheets from a spreadsheet using single connection manager?
I think using SQL Command we could able to do - not sure how to achieve that. Let me know the other alternatives too.
Thank you for any help
- Chennoju
View 13 Replies
View Related
Jan 15, 2008
Hi everyone - I'm getting myself into a right muddle and am looking for advice.
How do people deal with connection string matters when taking a dataset defined in one assembly (and by default using the connection strings defined within that assembly in the settings files) and then using that assembly in an app (which also has a requirement to see the same physical database).
I'm not sure I've explained that terribly well but what I'm trying to avoid is duplicate copies of my database which so far seems to be the only way that I've managed to make stuff work. I'm not very experienced with SSCE data access (I'm a serices/sockets/ip person) and this may just be ignorance. Most of the examples seem to assume that the data is in the same place as the app whereas I'm trying to collate a whole series of functions into a helper assembly that I'd like to re-use for other things.
Ideally the dataset designer would provide an easy way of choosing from centralised connection strings - perhaps this is what the Dataset Project implies - but again the docs are mostly focused on SQL Server? Otherwise the best I've been able to do is make the connection properties public and try to update them that way or use a post-build action to copy the database from my datalayer project directory to that of my application |DataDirectory|
I suppose the question might be if you have a dataset containing multiple tableadapters that assumes one connection string, is there any easy way to keep such strings co-ordinated between projects without hardcoding them? With a server resource, the same non-specific connection string resolves to the same server (if that make sense) and this seems to be were I can't make the logical shift.
Does anyone have any thoughts and can they please point this SSCE noob in the right direction?
Cheers
View 2 Replies
View Related
Jan 30, 2015
I am trying to create a logon trigger. As I am testing this, I discovered that each time I do a connection, I get 19 rows, inserted into my audit table. I ran profiler, and I see it is going through the logon trigger multiple times, for a single connection. So, what am I doing wrong? The code is fairly simplistic, and the profiler doesn't give a clue, as to what is going on. When I look at the output, I see the spid for the first couple of connections are different, then a spid, that is different from those 2 is in the next 17 rows. But, when I do an sp_who2, that spid does not exist.
This issue was noticed on a 2012 version, that I was first testing on, then had the same issue on a 2008 R2. I am currently testing on a 2014 version, that is doing the same thing. Is the logon trigger itself, firing, and causing this?
I also tried using the After Logon option, and got the same issue.
Here is the code:
CREATE TRIGGER LogonAuditTrigger
ON ALL SERVER WITH EXECUTE AS 'sa'
FOR LOGON
AS
BEGIN
DECLARE @Body NVARCHAR(2000),
[code]....
View 0 Replies
View Related