SQL Server 2005 Triggers And .NET Web Form Application

Jan 17, 2008

Hi,

Where do I ask questions about creating SQL Server 2005 triggers? I want to create a field in a SQl server 2005 database based on a combination of four (4) fields in one table, and then have the data updated in a field in the same table, as well as output to the asp.net web form.

Any guidance appreciated.

Thanks.

View 4 Replies


ADVERTISEMENT

How To Deploy SQL Server Everywhere With My Windows Form Application?

Jul 25, 2006

Hello!

I've been creating a vb.net 2005 windows form application using Everywhere and it has been going pretty well. However, I haven't had much luck finding any help on how to deploy my Everywhere database file(s) and Everywhere itself. To install redistribute Everywhere, can I just add the the 8 .dlls found in the Everywhere directory into my VS setup project? Also, what database file(s) do I need to deploy in my windows setup?

Thanks!

View 4 Replies View Related

How To Propagate User Identity Form Application Server To Database

Apr 21, 2008

Hi All,

I am new to MS SQL SERVER 2005.
My web application using SQL Server 2005 as back end database to store all the information.
I am using connection pooling to get connection form db.
But my fron end user( user who logged in into webapplication) lost his identity b'coz for database user is application server.
Now I wanna to track front end user in db.

In oracle I can do it by using CLIENT_IDENTIFIER. But in sql server I don't know how to do it.

in oracle i can do it as below
public void setIdentity(Connection conn, String identity) {
PreparedStatement ps;
try {
ps =
conn.prepareCall("begin dbms_session.set_identifier(?); end;");
ps.setString(1, identity);
ps.execute();
ps.close();
} catch (SQLException e) {
// Handle the exception
}
}
<!--[if !supportLineBreakNewLine]-->
once the transaction is complete, the application should reset the identity as follows:

public void clearIdentity(Connection conn) {
PreparedStatement ps;
try {
ps = conn.prepareCall("begin dbms_session.clear_identifier(); end;");
ps.execute();
ps.close();
} catch (SQLException e) {
// Handle the exception
}
}
<!--[if !supportLineBreakNewLine]-->
Please guide me for same.

Thanx in advance.

Bhadu<!--[endif]-->

View 6 Replies View Related

Where To Order The Table Values Displayed In A Web Form Object? In Sql Server Or In The Application?

Sep 10, 2004

Hi,

I have a table in my database with several car types, and the order I want for that table is:

Car_typeA_1
Car_typeA_2
Car_typeA_3
Car_typeA_4
Other_Cars_typeA
Car_typeB_1
Car_typeB_2
Car_typeB_3
Other_Cars_typeB
Car_typeC_1
Car_typeC_2
Car_typeC_3
Car_typeC_4
Car_typeC_5
Other_Cars_typeC
...


This table is more or less always the same, but from time to time I want to add a new car type, for instance; Car_typeA_5, but this new type must be located under the last register, in the example under ‘Other_Cars_typeC’. So, now the order is wrong, and when I want to display these car types to a web form object, the items will appear wrong ordered.

My question is: To order the values(items) correctly, Where I have to do it? In the web page (ASP.NET) code behind, or somewhere in SQL Server (for example in the Stored Procedure that passes the value to the application)? Or maybe in the same database table..?

Thank you,
Cesar

View 7 Replies View Related

4 Layered Web Application For Inserting Data Into A Database Using Sql Server As The Back End And A Web Form As The Front End Using C#

Dec 10, 2005

4 Layered Web Application for Inserting data into a database using sql server as the back end and a web form as the front end using C# .
Can someone provide with code as I am new to this architecture and framework.
Better send email.
Thanks In Advance,
A New Bie

View 1 Replies View Related

Remote Access For Windows Form Application

Jan 10, 2007

I have a windows based software application that connects remotely to a sql server 2005 and calls stored procedures. There is someone that I work with that is cautioning the company strongly that this is a bad thing to do in terms of security. Isn't this a very common thing to do? Assuming that the SQL Server installation is setup appropriately. Is this a bad practice?

View 4 Replies View Related

Failed To Connect To SQL Server 2005 Database Form Microsoft Office Business Scorecard Manager 2005

Apr 17, 2007

Hi,all BI experts here,

Thank you very much for your kind attention.

I am having a problem with connecting to SQL Server 2005 database from Office Business Scorecard Manager 2005 (the connection string i am using is: provider=SQLOLEDB;Data source=server_name; Initial catalog=database_name). But the connection failed. Would please any experts here shed me any light on what is the problem and how to fix it then? As there is no any forum for Office Business Scrorecard manager 2005. Therefore I post my thread here as it is related to the connection to SQL Server 2005 database engine, thought here is the best place for this question.

Thank you very in advance for your kind advices and help. And I am looking forward to hearing from you soon.

With best regards,

Yours sincerely,

View 6 Replies View Related

Triggers And .NET Application

Nov 4, 2005

Good day,

I have a trigger that fires on insert of a record to the table. What I need to do as well is then fire a VB.NET application, but in the process pass the values that have just been inserted into the table to the VB.net program and use those to perform some functions there in.

Is this at all possible?

Please can someone advise.

Thanks

View 4 Replies View Related

Web Form To Update SQL Server 2005 DB

Jul 26, 2007

Bear with me plase as I am nto very familiar with the coding world. The project I am working on is giving me troubles. I am trying to set up a form that can be used on line for our sales staff. It is a call activity form that I was hoping to submit to the DB I Have created in SQL. I would like the sales staff to fill out this form and then have their information transferred to the DB so that I can generate reports from that data. The trouble I am having is getting the intial connection to the DB opened up using the submit button on the form. I go into the code behind the page, and I have entered many scripts with no success. I continue to see that I receive erros when I try to use the opening line:
Dim cn As New ADODB.Connection

If anyone out there has some sample scripting that would help me with this, I would really appreciate it. Thank you.

Marc

View 1 Replies View Related

Import Data Form Access To Sql Server 2005

Feb 20, 2007

I have a database in ACCESS and i want everytime that there is a change made in Access the cude in SQL server to be automatically updated .Is there a way that this can be done with Integration Services?

View 1 Replies View Related

Recursive Triggers In SQL SERVER 2005

Oct 28, 2007



I have searched the net for atmost two days to find the solution of this problem but we not able to get the solution. I would appritiate if any one could help me in solving this issue:

I have a Table :

EMPLOYEES :

EMPID EMPNAME MANAGERID
1 abc NULL
2 xyz 1
3 hty 2
4 loi 3

I want to write a trigger for deleting the EMPLOYEE with EMPID=1 and the trigger should delete all the employees as there is cascading among them i.e EMPID 1 is the Manager of EMPID=2 and so on..

I found a solution at: http://msdn2.microsoft.com/en-us/library/aa902684(sql.80).aspx
but the solution does not work when i try to implement it . It deletes the record for abc,xyz in the above table but rest are not deleted by the trigger.

Can anybody tell me the exact Trigger code......

View 7 Replies View Related

Does A User Have To Have SQL Server Installed In Order For Windows Form To Connect To SQL 2005 Express DB

Apr 23, 2008

Hello,

I am creating a windows application that is not going to be used in a controlled environment like a LAN or some other network, so I want to include a local database in the install of this app. Ideally, I would like to use SQL 2005 Express like you would MSDE or Access, but I am not sure if the user must have SQL Server installed on their machine in order for this to work and I don't have a machine without it to test on.

Any help on this is greatly appreciated.

Thanks,
Derek

View 1 Replies View Related

SQLCe Errors When Doing Developing A SQL Mobile Application With Visual Studio 2005 And SQL Server 2005 Tutorial

Feb 26, 2008

I'm attempting to use RDA to synchronize a pocket pc emulator with SQL Server 2005 database by following tutorial http://msdn2.microsoft.com/en-us/library/aa454892.aspx, which uses AdvWorksMobile database that comes with SQL Server 2005.

When get to testing of "To test application features " ( step 4 of the merge replication setup lab ), I am receiving SQLCe Exception errors.

ORIGINALLY, I was able to deploy an application and view the local database on the emulator, but once I clicked "InitSinc" button, I received an error.

"Failure to connect to SQL Server with provided connection information. SQL Server does not" exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
Found this error listed in Server Agent Errors log http://technet.microsoft.com/en-us/library/ms172357.aspx, but it wasn't very helpful since it doesn't provide any suggestions on fixing the problems.

I am brand new to SQL CE Server , mobile programming and .NET framework in general so please bare with me



All the connections / security settings, etc that were set up were taken from a tutorial so I am not sure what SQLCeServer is complaining about. Reading up on the error on the web didn't help, it all pointed to making sure that the snapshot folder had correct permissions set up. I verified that MACHINENAMEUISR_MACHINENAME guest user had Read rights to the database so I don't think that piece is the problem. Otherwise ,Merge publication has been setup in Microsoft SQL Server Management Studio by following the tutorial.


I am trying to run this sync on my home pc so there should be no issues with any user permissions


I have IIS installed


I did NOT have SQL Server Agent running in management studio at this time


I am trying to run this tutorial on an XP machine, which is my regular home PC so I dont think there are any special networking settings to consider


I am able to hit http://localhost/AdvWorksMobile/sqlcesa30.dll from my pc OK, but when I try to hit it from a cradled emulator ( after replacing "localhost" with "MACHINE_NAME" ), Internet Explorer on the emulator gives me a "Cannot Connect With Current Settings" error message. This part wasn't part of tutorial but decided so not sure if I am supposed to be able to hit it from my emulator..so I am not sure if the fact that I can't hit it is related to the problem.
AFTER STARTING SQL SERVER AGENTin Microsoft SQL Server Management Studio, I killed the application, and after relaunching it, it hits "The Specified table does not exist [Vendor]" error. This time it doesn't even launch first - that is I dont even get to pressing "InitSinc" button. Debugger is showing that this error is hit on the following line in AdvWorksMobile.AddWorksDataSetTableAdapters

int returnValue = this.Adapter.Fill(dataTable);

I am not sure why the errors changed on me after starting SQL Server Agent.
What can I do to fix this connection problem?

Thank you so much for your help!

Irina


View 3 Replies View Related

Creating Triggers Using Managed Code In SQL Server 2005

Mar 6, 2008

Hi all( Create a VB 2005 SQL Server Project ) 

i want to Create a Trigger using Managed Code in VB.Net (.NET CLR integration with SQL Server.)Somebody help me.Thanks

View 2 Replies View Related

Do SQL Server 2005/CLR Triggers Support .config Files?

Jun 5, 2006

Does anyone know if it's possible to use the standard .config file within a CLR Trigger to read properties via the System.Configuration namespace

I guess it's not possible because the CLR Trigger needs to be compiled as an assembly which is hosted by SQL Server

Thanks

Jason

View 1 Replies View Related

Application Cannot Connect To SQL Server 2005.

Jun 28, 2007

I am having a strange problem. I have an application that to connects to SQL Database in SQL Server 2005.
When I run the application with Visual Studio everything works fine but when I deploy the application on my web server and then to access the site .
 I get an error : Login failed for user ''. The user is not associated with a trusted SQL Server connection.
For some reason the application is not passing the user name . I have checked the IIS and authentication is set to Integrated Windows Authentication .
 
My connection string is correct as well
 
 <add name="xxxxx" connectionString="Data Source=xxxxxx;Initial Catalog=xxxx;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
I will appreciate any kind of assistance in this matter. Thanks

View 2 Replies View Related

How To Call SQL Server 2005 From ASP.NET Application?

Apr 17, 2008

I am trying to call a view that is already in SQL Server 2005 from my ASP.NET 2.0 application.  I get the following error message:
 The request for procedure 'vwMyView failed because 'vwMyView' is a view object.
 I thought I could call a view the same way that I call a stored procedure but I guess I was wrong.  How can I fix this?
 Here is some sample code too:
Dim Results As DataSetDim Cmd As IDbCommand
Dim Adapter As IDbDataAdapter Results = New DataSet
Cmd = DB.CreateCommandCmd.CommandText = "vwMyView"
Cmd.CommandType = CommandType.StoredProcedure
Adapter = DataSource.CreateDataAdapter
Adapter.SelectCommand = Cmd
DB.Open()
Cmd.Connection = DB
Adapter.Fill(Results)
Cmd.Dispose()
DB.Close()
Return Results

View 5 Replies View Related

Can't Connect To Sql Server 2005 From My Asp.net Application

Apr 3, 2006

Hi
I can't connect to sql server 2005 from my asp.net web page. I seem to be able to connect to it when i run the application from within visual studio but i can't connect to it when i run the application from IIS.I am new to sql server 2005 express so please bear with me.The error message i get is: Cannot open database "Vets" requested by the login. The login failed.Login failed for user 'OSCAR2K4ASPNET'.I don't know where this user OSCAR2K4ASPNET came from but i looked in sql server 2005 and there he is. In the left hand pane I went to Security and then logins and found oscar2k4asp.net there. I went to the properties for this user and went to User Mappings. There was no tick next to my Vets database so I added one and ran the application from IIS. I also added the user to every single role in the vets database (including dbowner). I also went into the vets database itself and found the oscar/aspnet user and made sure he was added to every role.
I ran the application again. This time i got a lots of different errors. If the page was trying to run a select procedure I got the error user does not have select permission. If the page was running an SP i got the error or user does not execute permission
I have never had this problem before so I don't understand.Where did this user come from? Was he created automatically when i configured my database for membership and roles? How do i set up this user so he can access the databsae from IIS.
The only way I could get the application to run from IIS was to go to Security - Logins for sql server and add the oscar2k4asp.net user to the sysadmin role.
I find this very strange. Naturally i don't want to leave oscar2k4 in sysadmin.
Please help :) I can't upload my website until i fix this
Thanks, andrea

View 1 Replies View Related

ASP Application Becomes Slower In SQL Server 2005.

Feb 6, 2008

Hi all,
My ASP application is running fast in SQL Server 2000. But when we shifted it to SQL Server 2005, it becomes very slow.

I have created the indexes also. There is lot of data in the tables.
Is there any option to build the indexes for previous data.

Please help....

-Shah.

View 2 Replies View Related

Problem In VB6 Application With SQL Server 2005

Apr 2, 2006

I have got a VB6 application where I update local SQL server table from MS Access table with code like that:

----------------------------------------------------------------------------------------------------------------

Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "SELECT * FROM Table1 WHERE [Fld1]=" & v1, Cn, adOpenKeyset, adLockOptimistic
'check if exist if not exist create new
If rst.EOF Then
rst.AddNew
rst("Fld1") = v1
rst("Fld2") = v2
rst.Update
End If

rst.Close
----------------------------------------------------------------------------------------------------------------

On rst.Update I have got an error message that the server has to be added to syservers as linked with stored procedure sp_addlinked srever. Why?

Anyhow I executed the stored procedure then I've got error message 16933, "The cursor does not include the table being modified or the table is not updatable through the cursor."

I had to rewrite the code to "INSERT INTO (Fld1, Fld2..." and it works.

Is something wrong in SQL Server 2005 installation or any other reason?

Please help.



View 7 Replies View Related

Application Insist Open SQL Server 2005 While The Host Still With SQL Server 2000

Mar 12, 2007

I don't know why my application on the internet try to access the SQL Server 2005, when the host still having the 2000 edition. I put the following connection string: 
        Data Source=##DBSERVER##;Initial Catalog=##DBNAME##;User ID=##DBUSER##;Password=##DBPASSWORD##;       
 
Isn’t everything fine with that? I created the table by host but dosen’t work. I’m wondering if can I conect straight with Data Base, without register in the server, like with mdb?
 
This is the error that I’m getting.
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
 
 

View 1 Replies View Related

MSDTC - Remote Accessing SQL Server 2005 From A Desktop Application - Windows 2003 Server

Dec 6, 2007

Hi,

I am developing a windows application that needs to communicate with a remote SQL server 2005 database. Server allows remote connections and MSDTC service also running. Do I need to run MSDTC service on the client machine where I use desktop application ? any ideas ? It's throwing some error like
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.

But my SQL Server allows remote connection, and I am able to do a select statement.
But when I insert/update anything, it's throwing this error. I guess some problem with MSDCT. Anybody have any idea ?

View 1 Replies View Related

How To Get A Web Application To Connect To SQL Server 2005 Express

Dec 12, 2006

All,
I'm a newbie here so forgive me if I have missed something completely obvious.
 I have bought a shopping cart script of a well known company (Evolve Merchant 5) and I wish to set it up locally on my development server, I created a virtual directory, set the web application up and get the asp pages to display perfectly. However, in the configuration file (global.asa & web.config) for the application it reguests information to be provided: <add key="DBName" value="Database name" />
<add key="DBServer" value="IP address of server" />
<add key="DBUserName" value="User name" />
<add key="DBPassword" value="password" />
<add key="AltPassword" value="password" />


 What I can't determine is what the SQL Server 2005's IP address is? the pages of this application show when I type http://localhost/catalogue into IE, so I presumed the server address would be the IP of localhost, when typed ping localhost into command promt it gives me 127.0.0.1, but when I enter this into the config file and try to load the application it just hangs and then eventually says:
"Microsoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied./catalogue/global.asa, line 54"
I have created a new database in SQL Express called: merchant509 and restored the tables to it as the manufactures help files state, I created a new login called shop which uses SQl authentication, so as I can provide a password. So the settings should look like this:
  <add key="DBName" value="Database name" />
<add key="DBServer" value="127.0.0.1" />
<add key="DBUserName" value="shop" />
<add key="DBPassword" value="1684" />
<add key="AltPassword" value="1684" />
 
But it doesn't work, does anyone know what i have done wrong?? the SQL server is runnign on the same computer as I am trying to access it from, it is set to accept all forms of comunication i.e. TCP/IP etc.. in the server configuration manager the IP address part of TCP/IP in protocols shows IP1 as 192.168.2.2 active yes enabled yes, and IP2 as 127.0.0.1 active yes and enables yes, I have tried the 192.168.2.2 and this gives the same errors, this is my registed IP on my home network.
 I'm now stumped, I haven't a clue what else I can try, I would be very greatfull if anyone has any ideas.
Regards,
Daniel Coates
 
 
 
 

View 1 Replies View Related

SQL Server 2005 - Windows Application And Website

May 25, 2007

Hi there,
I have a question which I put the company that host my website but I didnt get a conclusive answer. Maybe someone here will be able to advise or help me with my situation.
I want to build a database that I will run on my local server and the front end of this will be run using a windows application. I have a website which I run the database on the remote server. What I would like to do is to be able to synchronize certain tables between the two databases (such as updating products table, or orders table). I am using sql server 2005 and I am using the sql server management studio to access my database on the remote server. I did notice there is a synchronzie button. I also came across some 3rd party tools. Not sure if that is the way to go.
If anyone as done this before or can give me any suggestions, I would be delighted.
Thanks
 Anthony

View 2 Replies View Related

SQL Server 2005 Application Role's Problem

Oct 8, 2007



Hi all.

I have developed a VB6 program which will activate an Application Role to UPDATE and INSERT some tables in SQL Server 2005.

My program will login with a username, say USER and then run with the rights of the Application Role which will SELECT, UPDATE and INSERT the following tables:
1) Table A
2) Table B
3) Table C

The USER login is a restricted user which has only SELECT permission to Table A, B and C.

I encounter a problem in which my program can only UPDATE table B and table C but Table A. I have double checked the settings of Table A, Table B and Table C. Theirs are all same. Fyi, the column which can't be updated is of type "datetime".

Once i grant USER login UPDATE permission to Table A, my program works perfectly in which it can UPDATE all the tables including Table A.

I have tried for almost 2 days but am still clueless. Any ideas?

Thank you so much.

View 7 Replies View Related

Accessing SQL Server 2005 From C# Using Multithreaded Application

Apr 18, 2007

I have a C# program that access SQL Server 2005. The program have 4 threads that performs the same method and are used only to improve performance of the system
The C# accesses the SQL Server using OleDbConnection and

OleDbCommand classes. Sometimes (very rare) I get exception to method ExecuteNonQuery() with message: "Table does not exist.".
The command text for the query is a constant string in the format: "insert into my_table€¦".
Can any one tell me what could be the problem?

View 6 Replies View Related

Web Application And Role Management In Sql Server 2005

May 10, 2006

Hi every body

 I'm developing a web application and i like to use the sql server 2005 role management features istead of developing a role management package in my program, I can do it on my tables and othe database items but I have no idea about using database access rights in my web pages to permit some one viewing or updating a web form... Is there any system table or system stored procedure showing access rights in my data base? or is there another idea to do this??

by Thanks

Javaneh

 

 

View 3 Replies View Related

Application Unable To Connect Sql Server 2005

Jan 3, 2007

Hi,

We recently installed Sql 2005 server and it was working fine. But today one of our user reported that they could not able to connect the sql server 2005 from the application. When I checked the error log, I found the following error for every one minute. We restarted the sql service on this sql 2005 instance but still we are getting the same error.

SSPI handshake failed with error code 0x80090311 while establishing a connection with integrated security; the connection has been closed.

Could any one help us on that?

Regards,

Sankar

View 4 Replies View Related

Creating An Application On SQL Server 2005 Express That Will Be Migrated To SQL Server

Sep 23, 2007



I have several general questions about this but I thought I would describe what I am doing first. My senior project team is developing a web application that will wind up using SQL Server for the database. We are writing it in ASP.net and developing the database on SQL Server Express. My job is to develop and deploy the database. I have an ERD designed and am getting ready to start coding the tables, constraints and stored proceedures but am unsure of a couple of things.

1) How do I create a new schema?
2) I can see how to create tables in the GUI but what I am trying to do is create scripts that can be used to create the tables and objects on the actual server that our client will be using. How do I create scripts in 2005 Express? Do I just go click on the new query button?
3) Are scripts that work for Express going to have any problem executing on SQL Server?

View 1 Replies View Related

Migrating MS-SQL Server 2000 To MS-SQL Server 2005 For Web Application On .Net Framework 1.1

Aug 10, 2006

Hello,

I have to do an impact analysis for migrating a .Net web based application. The current and desired scenarios are mentioned below.

The current environment:

OS - Windows 2000, SP4

Framework - .Net 1.1

SQL Server - MSSQL Server 2000

Desired Environment:

OS - Windows 2003, SP1 / Windows 2003 R2

Framework - .Net 1.1

SQL Server - MSSQL Server 2005

Please let me know

1. If any changes need to be done in the application when migrating the database from 2000 to 2005?

2. Any relevant document which will help me in the same.

Regards, Venkat





View 1 Replies View Related

Can I Use SQL Server 2005 Driver For PHP On X64 2003 Server As 64bit Application?

Nov 21, 2007

I'm sorry to bother you.

Now I'm trying to run PHP web application on x64 2003 Server with Microsoft SQL Server 2005. The version of PHP is 5.2.3. and the web application should be run as 64bit applications. Since there seems no way to use php_mssql.dll on the environment, I'm trying to use SQL Server 2005 Driver for PHP but when PHP loads php_sqlsrv.dll, an error has occurd and there's a following message in an error log...

PHP Warning: PHP Startup: Unable to load dynamic library 'c:phpextphp_sqlsrv.dll' - %1 is not a valid Win32 application

From this message, I thought the distributed libraries for Windows would be for a Win32 environment but there seemed no information that says the libraries run on Win32 environment only.

I really appriciate if you help me.
Thank you.

View 4 Replies View Related

ASP.Net 2.0 Application Connection To SQL Server 2005 - Setup Questions

Jun 5, 2007

All:
 I am writing an Internet/Extranet based (ASP.Net 2.0) web application that uses SQL server 2005 as the database. I am using forms authentication on my web application. I am also storing the connection string to SQL server in my web config file. The conn string is encrypted using DPAPI with entropy. I currently have created a SQL login account on my SQL server for use by the web application. This is the user ID I am using in my conn string. The reason for this is because all persons using the application will NOT have a windows login.
Here is my question: The login I created currently has defaulted to the "dbo" role and therefore has "dbo" rights to the database. I want to setup up this login account so that all it can do is execute stored procedures. I dont want this SQL login to be able to do anything else. In my application I am using stored procedures for ALL data access functions, via a data access layer in my application. Can someone guide me step by step as to how to setup this type of access for this SQL login.
 Thanks,
Blue.

View 4 Replies View Related

Moving A Database Application To SQL Server 2005 Express

Sep 13, 2006

I have been programming an application with VC++ 2005 and SQL Server 2005. I have converted an old 16-bit database to 32-bit managed code and SQL server and the application seems to be good. Now I want to deploy the application to another server for testing.

I have installed XP SP2, Windows Installer 3.1, Net framework 2.0 and SQL Server 2005 express to the test server. I have transferred the application with WI 3.1 and the program works well in the test server till the first SQL command. I have made a back up of the database and restored it in the test server. In the test server I can log in the database with Server Management studio and I can read the data there correctly. I have enabled both named pipes and TCP/IP for the database in the test server. With Surface Area Configuration I have enabled Local and Remote Connections Using both TCP/IP and named pipes. I only need Windows authentication at this time.

After all this when I come to the first SQL command in the application on the test server I receive the error message:
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: Named Pipes Provider, error: 40 €“ Could not open a connection to SQL Server).

My connection string to the database is:
'connection->ConnectionString = "Persist Security Info=False; Integrated Security =SSPI;"
"Data Source=TESTSERVER; Initial Catalog=TESTDATABASE;";'

When I use "Data Source=DevelopmentServer", the application works well on the development server.

Can't understand what is still wrong. Can you possibly have an answer for me?

View 4 Replies View Related







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