Multiple Sql Server Connection Over VPN

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


ADVERTISEMENT

How To Use The Multiple File Connection And Multiple Flatfile Connection?

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

SQL Server Express Multiple Connection Problems

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

Connection Pool To Access Sql Server For Multiple User?

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

SQL Server 2005 Connection Crashes With Multiple User Clicking Same Link.

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

SQL Server 2005 Connection Crashes With Multiple User Clicking Same Link.

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

SQL Server Admin 2014 :: Logon Trigger Executing Multiple Times For Single Connection?

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

How To Disable Multiple Connection On A Same Adp

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

Multiple Connection Type Query

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

Multiple DB Versions / Intermittent Connection

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

Setting And Restoring Multiple Connection Options

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

Working With Multiple Datasets And Connection Strings

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

Using The Same Connection In Multiple Threads -&&> Native Exception

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

Changing Connection String In Multiple Packages.

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

How To Handle Connection String When Using Tables From Multiple Databases?

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

Database Connection Pooling Behavior For Multiple IIS Sites.

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

Connection Crash If Multiple User Click Same Link.

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

Connection Issues When Running Multiple Instances Of Same Application

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

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 View Related

Error While Establishing A Connection To The SQL Server 2005 - Could Not Open A Connection To SQL Server

Apr 12, 2007

Hi, I had an old web application created during asp.net 1.1 and it have a connection problem with the sql server 2005 when it is mirgrated to a new webserver with dotnet framework 2.0 platform. I have enabled the remote access(TCP/IP and named pipes) in sql server 2005, did all the neccessary things, check whether the TCP/IP is enabled, named pipe is enabled...  I created another web application using VS 2005. The database connection works perfectly well.This are the connectionString from the old web application.<appSettings>    <add key="ConnectionString" value="Server=127.0.0.1;Database=somedb;User id=user; Password=somepassword; Trusted_Connection=False; POOLING=FALSE"/></appSettings>  Thankyou in advance! 

View 4 Replies View Related

SQL Server 2008 :: Failed To Acquire Connection (Local Server Connection)

May 5, 2014

Occasionally I'm seeing the following error when tranlog or full backup maintenance plan is executing.

Failed-1073573396) Failed to acquire connection "Local server connection". Connection may not be configured correctly or you may not have the right permissions on this connection.

What is strange is that it goes away without any action from myself. We have a tranlog backup that is scheduled every hour. I had this error happen once in the middle of the night. It looks like the job was running fine because almost all the backups are there. I've searched and not found a resolution to this error. I checked the event log and don't see any issues and even tried rebuilding the maintenance plans.

View 7 Replies View Related

Question: ODBC Connection Error .. Multiple Thread (urgent, Pls)

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

Query To Select Multiple Tables In Dataset Through ODBC Connection

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

Reporting Service-Dynamic Connection String &&amp; Multiple Instances

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

Excel Connection Manager Where There Are Multiple Rows Of Column Headers

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

Help. When Using Profile GetPropertyValue, I Get The Following Connection Error: An Error Has Occurred While Establishing A Connection To The Server. When Connecting To SQL Server 2005, This Failure May Be Caused By The Fact That Under The Default Sett

May 3, 2008

 Hi,I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property((string)(this.GetPropertyValue("Address1")));When I look at the stack, it is coming from my ProfileWrapper class which adds user address, city, etc.. from a class which inherits fromSystem.Web.Profile.ProfileBase. From the stack, it is calling the System.Web.Profile and crashed when it tries to open a connection atSystem.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject). I already migrated all aspnet_user, aspnet_roles, etc.. and don't get any connection errors. It is only when I try to get the profile data. This works on  my pc, but throws an error on my lunarpage website.Any help is greatly appreciated.Thanks,AJAn error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)Source Error:Line 100:    public virtual string Address2 {Line 101:        get {Line 102:            return ((string)(this.GetPropertyValue("Address2")));Line 103:        }Line 104:        set {Source File: c:windowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot021d50639a6858cApp_Code.54nvluyo.1.cs    Line: 102Stack Trace:[SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +435   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105   System.Data.SqlClient.SqlConnection.Open() +111   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197   System.Web.Profile.SqlProfileProvider.GetPropertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc) +782   System.Web.Profile.SqlProfileProvider.GetPropertyValues(SettingsContext sc, SettingsPropertyCollection properties) +428   System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) +404   System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName) +117   System.Configuration.SettingsBase.get_Item(String propertyName) +89   System.Web.Profile.ProfileBase.GetInternal(String propertyName) +36   System.Web.Profile.ProfileBase.get_Item(String propertyName) +68   System.Web.Profile.ProfileBase.GetPropertyValue(String propertyName) +4   ProfileCommon.get_Address2() in c:windowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot021d50639a6858cApp_Code.54nvluyo.1.cs:102   ProfileWrapper..ctor() in d:inetpubvhostsjavcentral.comhttpdocsApp_CodeProfileWrapper.cs:242   ProfileDataSource.GetData() in d:inetpubvhostsjavcentral.comhttpdocsApp_CodeProfileDataSource.cs:17[TargetInvocationException: Exception has been thrown by the target of an invocation.]   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0   System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +308   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29   System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +480   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1960   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70   System.Web.UI.WebControls.FormView.DataBind() +4   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82   System.Web.UI.WebControls.FormView.EnsureDataBound() +163   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69   System.Web.UI.Control.EnsureChildControls() +87   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +21   System.Web.UI.Control.FindControl(String id) +9   CustomerDetailsEdit.OnPreRender(EventArgs e) in d:inetpubvhostsjavcentral.comhttpdocsUserControlsCustomerDetailsEdit.ascx.cs:60   System.Web.UI.Control.PreRenderRecursiveInternal() +86   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Control.PreRenderRecursiveInternal() +170   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041 

View 1 Replies View Related

Retrieving Multiple Values From One Field In SQL Server For Use In Multiple Columsn In Reports

Mar 30, 2007

I am trying to create a report using Reporting Services.

My problem right now is that the way the table is constructed, I am trying to pull 3 seperate values i.e. One is the number of Hours, One is the type of work, and the 3rd is the Grade, out of one column and place them in 3 seperate columns in the report.

I can currently get one value but how to get the information I need to be able to use in my reports.

So far what I've been working with SQL Reporting Services 2005 I love it and have made several reports, but this one has got me stumped.

Any help would be appreciated.



Thanks.



I might not have made my problem quite clear enough. My table has one column labeled value. The value in that table is linked through an ID field to another table where the ID's are broken down to one ID =Number of Hours, One ID = Grade and One ID= type of work.

What I'm trying to do is when using these ID's and seperate the value related to those ID's into 3 seperate columns in a query for using in Reporting Services to create the report

As you can see, I'm attempting to change the name of the same column 3 times to reflect the correct information and then link them all to the person, where one person might have several entries in the other fields.

As you can see I can change the names individually in queries and pull the information seperately, it's when roll them altogether is where I'm running into my problem

Thanks for the suggestions that were made, I apoligize for not making the problem clearer.

Here is a copy of what I'm attempting to accomplish. I didn't have it with me last night when posting.



--Pulls the Service Opportunity

SELECT cs.value AS "Service Opportunity"

FROM Cstudent cs

INNER JOIN cattribute ca ON ca.attributeid = cs.attributeid

WHERE ca.name = 'Service Opportunity'



--Pulls the Number of Hours

SELECT cs.value AS 'Number of Hours'

FROM Cstudent cs

INNER JOIN cattribute ca ON ca.attributeid =cs.attributeid

WHERE ca.name ='Num of Hours'



--Pulls the Person Grade Level

SELECT cs.value AS 'Grade'

FROM Cstudent cs

INNER JOIN cattribute ca ON ca.attributeid =cs.attributeid

WHERE ca.name ='Grade'



--Pulls the Person Number, First and Last Name and Grade Level

SELECT s.personnumber, s.lastname, s.firstname, cs.value as "Grade"

FROM student s

INNER JOIN cperson cs ON cs.personid = s.personid

INNER JOIN cattribute ca ON ca.attributeid = cs.attributeid

WHERE cs.value =(SELECT cs.value AS 'Grade'

WHERE ca.attributeid = cs.attributeid AND ca.name='Grade')

View 11 Replies View Related

Reading Multiple Worksheets From A Spreadsheet With A Single OLEDB Connection Manager(Excel).

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

VS2008 Solution With Multiple Projects. Best Practices For Connection Strings And SSCE Files?

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

XML Data To SQL Server With Multiple Orders An Multiple Order Details??

Aug 5, 2004

Hi all!

I'm trying to get some XML data into SQL Server but i ran into problem when inserting the data (multiple orders with multiple order details) using a single sproc. Is it possible, or do I have to do in some other way? :confused:

I simplified my example to this:
-----------------------------
--CREATE PROCEDURE sp_InsertOrders AS

DECLARE @docHandle INT, @xmlDoc VARCHAR(4000), @orderID INT

--DROP TABLE #Orders
CREATE TABLE #Orders
(
OrderId SMALLINT IDENTITY(1,1),
FkCustomerID SMALLINT NOT NULL,
OrderDate DATETIME NOT NULL
)

--DROP TABLE #OrderDetails
CREATE TABLE #OrderDetails
(
OrderDetailsId SMALLINT IDENTITY(1,1),
FkOrderID SMALLINT NOT NULL,
ProductID SMALLINT NOT NULL,
UnitPrice SMALLINT NOT NULL
)

Set @xmlDoc = '
<Orders>
<Order CustomerID="1" OrderDate="2004-04-01">
<OrderDetails ProductID="6" UnitPrice="19"/>
<OrderDetails ProductID="3" UnitPrice="11"/>
<OrderDetails ProductID="9" UnitPrice="7"/>
</Order>
<Order CustomerID="2" OrderDate="2004-04-12">
<OrderDetails ProductID="2" UnitPrice="24"/>
<OrderDetails ProductID="4" UnitPrice="13"/>
</Order>
</Orders>'

EXEC sp_xml_preparedocument @docHandle OUTPUT, @xmlDoc

INSERT INTO #Orders (FkCustomerID, OrderDate)
SELECT CustomerID, OrderDate
FROM OpenXML(@docHandle, 'Orders/Order', 3)
WITH (
CustomerID INTEGER,
OrderDate DATETIME
)

SET @OrderID = @@IDENTITY;

--INSERT INTO #OrderDetails (@OrderID, ProductID, UnitPrice)
SELECT @OrderID AS OrderID, ProductID, UnitPrice
FROM OpenXML(@docHandle, 'Orders/Order/OrderDetails', 3)
WITH (
ProductID INTEGER,
UnitPrice INTEGER
)
-----------------------------

All orders are inserted first which makes the use of @@IDENTITY incorrect (it works fine if you insert a single order with multiple order details). Since it was quite some time since I last worked with SQL I am not sure if am doing it the right way... :confused: :confused: Anybody out there who knows how to solve the problem?

Cheers,
Christian

View 2 Replies View Related

SQL Server 2012 :: Concatenate Multiple Rows In Multiple Columns

Aug 5, 2014

I concatenate multiple rows from one table in multiple columns like this:

--Create Table
CREATE TABLE [Person].[Person_1](
[BusinessEntityID] [int] NOT NULL,
[PersonType] [nchar](2) NOT NULL,
[FirstName] [varchar](100) NOT NULL,
CONSTRAINT [PK_Person_BusinessEntityID_1] PRIMARY KEY CLUSTERED

[Code] ....

This works very well, but I want to concatenate more rows with different [PersonType]-Values in different columns and I don't like the overhead, of using the same table in every subquery ([Person_1]). Is there a more elegant way to do this, without using a temp table or something else?

View 1 Replies View Related

SQL Server 2008 :: How To Update Multiple Column With Multiple Condition

Feb 25, 2015

I need to update multiple columns in a table with multiple condition.

For example, this is my Query

update Table1
set weight= d.weight,
stateweight=d.stateweight,
overallweight=d.overallweight
from
(select * from table2)d
where table1.state=d.state and
table1.month=d.month and
table1.year=d.year

If table matches all the three column (State,month,year), it should update only weight column and if it matches(state ,year) it should update only the stateweight column and if it matches(year) it should update only the overallweight column

I can't write an update query for each condition separately because its a huge select

View 7 Replies View Related

Connection Strings, Trusted-connection VS Username-password, SQL Server 2005 Express

Mar 9, 2007

All --
Please help.
I have some questions about connection strings.
 
BACKGROUND...

Note that I am using the "SQL Native Client OLE DB Provider", SQL Sever 2005 Express, ASP.NET, C#.NET, and VS.NET 2005.
Note that I do not want to use the "Attach a database file" type of connection string.
Note that I am using the site http://www.ConnectionStrings.com as a reference.
Note that this "Standard security" connection string...<add name="LocalSqlServer" connectionString="Server=MYTESTOFFICESERVERS;Database=MyDatabase;Uid=MyDatabaseUser;Pwd=MyDatabasePassword;" />...does not work and causes the following run-time error...A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
Note that this "Trusted connection" connection string...<add name="LocalSqlServer" connectionString="Server=MYTESTOFFICESERVERS;Database=MyDatabase;Trusted_Connection=yes;" />...works but is less-than ideal because it uses a Trusted Connection rather than a Username/Password combination.
 
QUESTIONS...
(A) What exactly does the error in Item 4 mean?
(B) Do 4 and 5 imply that one must use a Trusted_Connection for all SQL Server 2005 Express connection strings when the database does not reside in the web application's App_Data folder or use a "Attach a database file" type of connection string?
(C) Are there any alternatives?
(D) What do you suggest?
 
Please advise.
Thank you.
-- Mark Kamoski

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved