.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

an issue with server while inserting data into database

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :Sql Server

hi there

I am having an issue while inserting some data into (database )sqlserver,i have provide you with error detailed ,I think is quit basic issue but i do not how to sort it out, please help me out on this ,many thanks



System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
   at System.Data.Sql

View Complete Post

More Related Resource Links

Metadata: Create a Database Schema Repository with Meta Data Services in SQL Server 2000


SQL Server 2000 Meta Data Services is a repository technology that stores and manages metadata for SQL Server. Instead of building database schemas over and over, Meta Data Services allows you to freeze an entire schema for use in other projects. You can also use these schemas for training, testing, or debugging. In this article, the authors will review the various components of Meta Data Services and show how it can be programmed using a Visual Basic client, XML, and XSLT. They will also show you how to manage and manipulate your metadata by generating a simple database schema using a SQL Server repository.

Alok Mehta and Ricardo Rodriguez

MSDN Magazine May 2003

Insert Excel Data via File Upload into sql server database???

Hi all, I have requirement that User can Upload the Excel Sheet Data to sql server Database at once. How i do that Any Article or hint is apperciated.   Regards 

Facing MSDTC related issues while archiving data from one database server machine to another databas

I have a question with respect to distributed transactions when carried out between two database server machines on the same network.   Consider there are two database server machines \SOURCE_DATABASE_SERVER\ and \DESTINATION_DATABASE_SERVER\. Now we have to archive the data from one database server to other database server.   Let us suppose the database server \SOURCE_DATABASE_SERVER\ is the live production database server and \DESTINATION_DATABASE_SERVER\ is Long term storage database server. Now data from \SOURCE_DATABASE_SERVER\ needs to be archived into the database server \DESTINATION_DATABASE_SERVER\.   So I have written a dynamic stored procedure which includes distributed transaction (begin Tran, commit Tran, rollback            Tran) coding in it.   Now initially when I executed the procedure, it gave some of the following errors   1) OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" returned message "The partner transaction manager has disabled its support for remote/network transactions.". Msg 7391, Level 16, State 2, Line 1 The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" was unable to begin a distributed transaction.    

Issue inserting to database on submit the page goes blank

Hi guys,I'm new to asp.net, can someone please help me with this. I'm trying to insert few values to a table, when i press the submit button the aspx page goes blank and i don't get any error message. I'm not able to find where the error is.The code:Protected Sub AddMInfo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddMInfo.Click Dim dbsource As SqlDataSource dbsource = New SqlDataSource         dbsource.ConnectionString = ConfigurationManager.ConnectionStrings("dbConnectionString1").ToString         dbsource.InsertCommandType = SqlDataSourceCommandType.Text         dbsource.InsertCommand = "INSERT INTO db_mdl_info(dlprodid,dlmdlid,dlbrnd,dlmdlnm,dlmdlnbr,dlcpst,dlprsr,dlmxm,dlmim,dlmslt,dlmxps,dlmtpe)" &                                 "Values('" & DropDownList2.Text & "','" & DropDownList3.Text & "','" & MakeTextBox.text & "','" & DropDownList2.SelectedItem.Text &                                 "','" & MNoTextBox.Text & "','&quo

Best way to send data to report server from merge replicated database

Hi ALL,              I have merge replication configured on database say Testdb on production server. I want data from testdb(merge replicated) database to send to report server. How can i accomplish this....Whts the best way to send data at regular intervals to report server.. Any suggestions plz TIA

Questions on Multi-Tenant Data Architecture for SQL Server Database and ASP.NET application

My company wants me to make the same asp.net application and sql server database be sharable amongst different clients. Clients will use the database for their own business use, will have their own data, we will have our own data. How can I share the same SQL Server database amongst different clients having same ASP.NET application (but somehow be able to differentiate which client user is logging in) ? Do I need to use ApplicationID and how will I detect at login which one to use ? I know I will need to add another field in all tables to differentiate client's data from ours.  

inserting an array of data into a database table

im looking to insert an array of information into a database tableessentially what id like to do is something like this:            objCmd = New OleDb.OleDbCommand("INSERT INTO pluINFO VALUES *", objConn)            For j = 0 To 265                objCmd.Parameters.Add( info(j) )            Next this code gives me a syntax error for the insert statement is there anyway i can set the insert statement that would allow me to add each element of the array(looping through rather than hardcoding several hundred entries) into the table?any input appreciatedThanks

buffer data from a sql server database file

I'm in need of a sample code that will let me buffer data from a database so that I can go next> and <prev in a database file. Does someone have an idea on now to do this. Joe      Toppers BBS http://toppersbbs.dtdns.net C# Windows and Console applications. PHP, Mysql. HTML

SSIS 2005 - XML Source no data loading to sql server database destination

Hello I am trying to load data from xml source to sql server destination, but the task executes with no data loaded to destination. i really appreciate any guidance in working and troubleshooting xml sources. Regards Harris

How to submit data to a SQL Server database table from a custom page ?

Using SPD, I have created a custom page. It has a form with ASP.NET controls textbox, radio buttons, dropdown, submit button etc., Also, I created a Database connection (to the SQLServer database table) under Database Connections. But not sure how to connect this form to the database connection so that when form data is submitted, the data will be inserted into the table.

Incremental data load from MySQL database to SQL server 2008 using SSIS


I am looking for best solution to perform incremental data load from MySQL database to SQL Server 2008.  I tried to follow instructions from articles on incremental data load in SSIS  using MD5 hashes but I failed to make connection in Lookup transformation editor between MySQL Id (4 byte unsigned integer) and Id in SQl Server 2008 table which is  bigint. i tried to add  data conversion and convert MySQl Id to string. It works fine when you map this field directly to OLEDB destination but in Lookup component it failed. 


Any input greatly appriciated.



Issue with SAN Drive Migration in master database in clustered SQL Server 2005 SP1




In our SQL Server 2005 SP1 cluster, I have to retire the existing SAN and move all my databases to new SAN drive. I have successfully moved all datafiles (user,system databases, resource) except master database.


Even when I change the parameters in start-up from configuration manager, I am getting error when starting up from cluster administrator / configuration manager.


But I am able to start the SQL Server successfully from command line (without any flags).


When I start the SQL Server from cluster administrator / configuration manager (after changing the parameters), I see that the start-up parameters are changing back to originalpath (old SAN) .


Please let me know incase you need any more information.

Reading and checking .CSV File and Inserting Data to SQL server



I have got a page in which there is a file upload option where I have to upload/import the csv file. What I want to do is to check if the correct format of file is uploaded for instance if any other than csv file is uploaded, the system should give an error message. Also what I need to do is to check certain fields of the csv file for instance there are some mandatory fields in the csv file which should be there like name , postcode, How can I check that these fields are not empty . After performing these task, the system should automatically upload the csv file onto the sql sever 2008. Any ideas  or tutorial ... will be highly appreciated. 

create an infopath form that receive and submit data to sql server database in the same form



i want to create an infopath form that can receive the data out of the slq server database and edit the data in the database and then submit it.

here is what i did so far.

i created a data connection to a sql server database to SUBMIT the data.

also i created a data connection to the same sql server database to RECEIVE the data.

when i open the form the user and the user's details are already filled in the form, now i need to let the user edit the data in the fields or add a new data in a field and then the form need to be submitted to a temporary database to be checked first by an approver and after approval the form must be submitted to the real sql server database.

i tought about that the approver just need to click a button and the data will be submitted to the the real database.

both the temporary and the real database has the same tables and fields.

i just need to know how to edit and submit the data to the temporary later to the real database



Catch 22 Database Connection Validation Issue w/ BIDS and Production Server


I have a rather simple SSIS package that exports data through an ODBC connection from an IBM iSeries database and copies that data to a SQL Server 2005 database.  When I was designing the application, I was able to connect to the iSeries database and store the user ID and password with my BIDS project and copy the data with out any problems.  Great!

When I finished designing and testing the project, I loaded it to the production server.  The final test was to schedule the process so that it would run each night.  I didn't realize it at the time but the password that I had stored with the project in BIDS was removed from the package and various MS documentation stated that I should create a configuration file and load the password from there.  So, I made the necessary changes to the project, adding a configuration file.  The config file is in the Miscellaneous folder within the BIDS project, however, it isn't automatically copied to the bin directory when I build the project.  I have to manually save it to the server, and then after importing the project I have to manually link to the necessary config fields.

This fixed the problem with the server, however, now I can not get BIDS to save my password with the connection string from within the designer.  This is a huge problem.  I am exporting from 21 different da

unable to save data in SQL Server database through Sharepoint 2007


Hi All,

I have created dummy database, Table in SQL Server 2005 with some values.
Iam able to pull data from the SQL database to sharepoint dataview webpart through data connection using sharepoint desigher.

Now i have to enter new record in to SQL table through sharepoint. i have checked with sharepoint designer but unable get it done.

Can some one have idea on this. Please help me to get it done

Thanks in Advance.

Lookup data from SQL Server database


Hi guys,

My organisation has got a SQL Server database that contains all employee information. I want to use that information inside of SharePoint, for example by creating a Lookup field that shows all employees from the SQL Server database.

I wonder how to go about that?

a) Do I somehow need to synchronise the content of the SQL Server database with a SharePoint list (effectively creating a copy of the Data inside of SharePoint)?

b) Can I create a Lookup field that gets data from an external Source (custom SQL Server database)?

I have got MOSS, so I wonder if the Business Data Catalog does something like this, but so far I couldn't figure out how. All I seem to be able to do is display data from SQL Server as a Data View, which is all nice but doesn't really give me what I need.

Thanks for the info.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend