Problem Of Uploading Asp.net Website On Web Server

Jul 16, 2007

i have developed a website using asp.net, c# with SQL SERVER EXPRESS EDITION 2005. The database is being used both for retreival and updation purpose.  the website is working accordingly when i m running it on my system, ie., data is getting retreived from the  database and it is also getting updated on button click. But when i m uloading my site on the httpdocs folder of web server, connectivity with database is failing miserably, ie neither getting retreived from the database nor getting updated.  The error message displayed by the web server is given underneath. i have used Grid view for displaying data from the database and Details view for updating the database.

i have used window authentication for connecting with the database.
Please help me with finding out a solution for it. give me proper explanation and i need to do

Server Error in '/' Application.


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)

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

View 10 Replies


ADVERTISEMENT

Problems Uploading The ASp.Net 2.0 Website

May 29, 2007

Hello Members

I m an ASP.NET Doveloper

I have purchased a domain name and uploaded the website

I m having some problems in attaching the database

Actually i dont no the procedure

my websites address is www.webgrowthengine.com

pls help

Nitin

View 5 Replies View Related

Uploading Images To Sql Server

Aug 22, 2003

Hope someone can help with this.

i am trying to upload images from an asp.net or vb.net front end to a sql server db.
I can upload the image fine if I first save the image to a file and then upload but my question is whether I can upload the image without first saving the image file. What i would like to do is to capture an image with a digital camera and without saving it first (an extra step for the user), upload it to a sql server db.

Is this even possible.

Thank you,

Biirir

View 2 Replies View Related

Uploading Data To Different Server

Dec 2, 1999

Iam currently loading the data using dts by way of exporting the tables in textfile and then importing it at the destination. But this takes hours to do that. So i would like know best way for a big database.

View 3 Replies View Related

SQL Server Express Uploading

Feb 24, 2008

Hi All,

I have created my first database in SQL Server 2005 Express and would like to try putting it online.

I asked the web host to create an account. They gave me host name, database name, username and password.

The problem is that i dont know where i enter that information.

I cant find the answer in my books or online. The host said i needed MSSQL Enterprise manager.

Can i get this with the Express or do i need to pay for a different version of SQL Server? If Express has it, where do i find it please?

Any help much appreciated, as i'm completely lost!

Kind regards,

Justin

View 2 Replies View Related

Need Help For Uploading Data From Excel To SQL Server

Jul 11, 2005

I have searched the forum for the code and found one. But, I encounter a problem which i can't understand.Can anyone help me with this?I encounter a "Keyword not supported: Provider"But then i have try to take out the provider and the result is they ask for a provider.Help!! ' Create the connection object for the Excel file Dim excelConn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=" & filepath & ";" & "Extended Properties=Excel 8.0;") excelConn.Open() ' Get the name of the Excel spreadsheet Dim schemaTable As DataTable = excelConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, _ New Object() {Nothing, Nothing, Nothing, "TABLE"}) Dim excelSheetName As String = schemaTable.Rows(0).ItemArray(2) ' Create the connection object for the SQL Server database Dim sqlConn As New SqlConnection(strSqlConnString) sqlConn.Open() Try ' Create new OleDbDataAdapter that is used to build a DataSet Dim excelDataAdapter As New OleDbDataAdapter("SELECT * FROM [" _ & excelSheetName & "]", excelConn) Dim excelDataSet As New DataSet ' Treat newly added rows as inserted rows, so they will all ' be inserted into SQL table excelDataAdapter.AcceptChangesDuringFill = False excelDataAdapter.Fill(excelDataSet, tablename) Dim excelTable As DataTable = excelDataSet.Tables(tablename) ' Create new SqlDataAdapter that is used to build a DataSet Dim sqlDataAdapter As New SqlDataAdapter("select * from " & tablename, sqlConn) Dim sqlDataSet As New DataSet sqlDataAdapter.Fill(sqlDataSet, tablename) Dim sqlTable As DataTable = sqlDataSet.Tables(tablename) ' Loop through each column name in the Excel DataSet and make sure it matches a ' column name in the SQL Server DataSet Dim excelCol, sqlCol As DataColumn Dim allColsCorrect, matchFound As Boolean allColsCorrect = True For Each excelCol In excelTable.Columns matchFound = False For Each sqlCol In sqlTable.Columns If excelCol.ColumnName.ToLower.Equals(sqlCol.ColumnName.ToLower) Then matchFound = True Exit For End If Next sqlCol 'CloseMonth is a field in the Excel sheet, but not in SQL DB, so just ignore If matchFound = False Then If Not (excelCol.ColumnName.ToLower.Equals("CloseMonth".ToLower)) Then Response.Write("<br>**Column '" & excelCol.ColumnName & _ "' in Excel file does not exist in SQL Server table.") allColsCorrect = False End If End If Next excelCol ' If all columns in Excel table match those in SQL table, then delete current ' contents of the SQL table and insert the data from the Excel table If allColsCorrect = True Then Dim deleteCommand As New SqlCommand("TRUNCATE TABLE " & tablename, sqlConn) deleteCommand.ExecuteNonQuery() Response.Write("- Deleted old data from SQL Server table.<br>") ' Create the CommandBuilder object to create the Transact SQL (TSQL) commands ' that are necessary to update and to insert records into the data source. Dim x As SqlCommandBuilder = New SqlCommandBuilder(sqlDataAdapter) Try 'sqlDataAdapter.ContinueUpdateOnError = True sqlDataAdapter.Update(excelDataSet, tablename) Response.Write("- Updated data in SQL Server table.<br>") Catch Exc As Exception Response.Write("<br>Error(message): " & Exc.Message) End Try Else Response.Write("<br>(The spreadsheet could not be loaded into the table " & _ "because of the above errors.)<br>") End If Catch Exc As Exception Response.Write("<br>Error: " & Exc.Message) End Try ' Clean up objects. excelConn.Close() sqlConn.Close()

View 1 Replies View Related

Uploading Access 97 Table To SQL Server

Oct 16, 1998

Hi all,

Please bear with me because I am brand new to SQL Server, and I may not be using the correct wording to explain everything...

I`m using Access 97 to upload a table to a SQL Server 6.5 database. I also have SQL Enterprise Manager. The allocated space on the SQL Server for my database is 20 MB and the space for my database log file is 4 MB. The first time I tried to upload a table to the database, I got the following error:

[Microsoft][ODBC SQL Server Driver][SQL Server] Can`t allocate space for object "syslogs` in database `testpropcontdb` because the `logsegment` segment is full. If you ran out of space in Syslogs, dump the transaction log. Otherwise, use ALTER DATABASE or sp_extendsegment to increase the size of the segment (#1105)

I went into the Enterprise Manager and right clicked on my database and selected edit. It shows that I have 19.89 of the 20 MB free, and all 4 MB of my log space free.

When I select GET EXTERNAL DATA -> LINK TABLES from the FILE menu in Access, and link to the table I just uploaded to SQL Server, the structure (field names and attributes) is there, even though I got that error message earlier. There is just no data being uploaded.

Could someone please point me in the right direction? I`ve been reading help files and searching the net, but I haven`t figured out what is causing this error message.

Thanks in advance for lending your expertise.

Elizabeth Fisher

View 3 Replies View Related

Uploading SQL SERVER With Remote Data.

Jan 3, 2007

Client side:
1. my DSN is CMDB.dsn on a mapped network drive(only way for now that I get a connection)
2. My client does not fail to connect, but I am having a hard time
linking my database tables to each other. Through Access 03.
3. My client is remote
4. I can ping the server,
5. but I cannot telnet
6. My application is Access 2003,
7. I am on a different domain
9. I have table names that match,
10. I do not force encryption.


Server side:
1. SQL SERVER 2005
2. Standard Edition
3. TCPIP
4. The server starts fine
5. The SQL browser is enabled YES
6. Domain Account
7. Not applicable
8. NO

Platform:
1. Client runs Windows XP, Server runs Windows Server 2003

My question then is this: Does anyone know of code that can be used to import data from a CSV file to a server on a different domain?
This is tricky cause the connection is not really allowing this kind of access. Which is my next question: How do you get these two applications to connect?
I don't want to do it with ADP, and linking the tables I always seem to have to place the DSN on a mapped network drive to get results. Then after that I go
to link tables from the SQL Server and the tables I created there are no where to be found. Why is this happening? It gives me a list of System tables but none of my

View 1 Replies View Related

Uploading Video Clip In Sql Server 2005?

Feb 22, 2007

Hi All,
How can I upload Video Clip in Sql Server 2005?
 
Regards,

View 1 Replies View Related

Problem Uploading Data Into SQL Server With SSIS

May 24, 2007

Hi



I designed a package in SSIS that loads data from an Excel source into a oledb SQL database table.



The problem I have is that two of the columns that are supposed to be nvarchar type columns sometimes contain numerical strings. These values causes an error when 'Allow Null' is not set and loads as NULL if 'Allow Null' is set.



How can I force these values into the table?



I have a script transformation object in the package with this code:



If IsNumeric(Row.OCCode) Then

Row.ItemCode = CStr(Row.OCCode)

Else

Row.ItemCode = Row.OCCode

End If



ItemCode is of type unicode string and the column in the SQL DB Table it's mapped to is of type nvarchar

View 10 Replies View Related

SQL 'Server' Or 'Local' Database For Uploading To Hosting Service Provider

Mar 23, 2007

Hi, I'm developing a website using VWD 2005 Express, which needs a Membership system and a products database. Using the VWD inherent Web Site Administration tool makes the membership set up easy but by default it creates a 'Local' SQL database in a folder named 'Apps_Data' in the VWD project. My question is: considering I will need to upload my web site to a Hosting Service, would it be better to change the default so that the membership systems, and the product database I need, are created in an SQL 'Server' database instead of a 'Local' database?
The hosting service I am considering using is having a bit of a problem understanding this question, I hope it makes sense to someone or am I asking a stupid question?
Regards
Sean.

View 2 Replies View Related

SQL Server 2012 :: New Column In Existing Table And Uploading Data

Jan 13, 2015

Need to change the datatype of existing column which has huge data.

I'm performing below steps

1. Create new column with correct datatype in the same table
2. copy data into new column
3. drop indexes on column
4. <<<>>>
now the existing column also has many SP dependent and I do not wish to drop them.
5. rename existing column to xxx
6. rename new column to correct column
7. drop old column
8. make required indexes

View 9 Replies View Related

Uploading Database To Sever With Sql Server Management Studio Express

Jun 28, 2007

Hello,



I would like some help in uploading a database from my harddrive to a server using sql server management studio express.



If I try to attach it to the server, this program only looks at the files on this server and not on my harddrive. So how can I copy a sql database to my folder on the server.



I am sure it must be a simple problem, but I've been bizzy with it for about a day now. So, please advice.



Rgds,



Wouter.

View 7 Replies View Related

Uploading An SQL Server Express Database To A Server

Oct 8, 2006

I am new with Visual Web Developer SQL Express and for a start I have been using the VWDHosting.net (Trial hosting for VWD 2005 Express) with a test website using login and membership controls. I followed the excellent instruction in the User Guide (for transferring data and adapting the connectionstring) and it worked succesfully. However, I have problems getting the same test website installed with my hosting provider.The VWDhosting.net has a special functionality for uploading the contents of a local database to a database created on the server. In the Restore database section is a field the "Restore database from SQL Server 2005 mdf file". After selecting in that field your local database, you can click the "Attach"-button and then the contents of the local database are transferred to the database on the server. With my hosting provider (using SQL Server 2000) I have to use the same procedure: creating a MS SQL database on the server and then transfer the contents of my local database. How can I do this? (My hosting provider does not offer me a similar "Attach" button).Do I have to use SQL Server Management Studio?Kees

View 1 Replies View Related

Uploading Tables On Sql Server (domain Server)

Mar 11, 2000

Hi everybody,

Please suggest me a guideline to upload tables on sql server
for internet based application.

Actually I want to know the exact procedure what are the files to
upload (of sql server) OR i have to export the whole database
to the domain server.

Thank you
Harish

View 1 Replies View Related

Uploading SQL Express To SQL Server 2005 - Role's Causes Application Error With SSE Provider

Jun 25, 2007

I am very frustrated.  Everything works on the local host but when I upload to server I can login to the admin role I created, but when I try to access pages that have role priveleges I get the following error: 
The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.
The ASPNETDB.MDF database was uploaded using the Database Publishing Wizard.
Please help!

View 1 Replies View Related

Uploading SQL Server Database To A Server?

Mar 4, 2005

All right, I've got a small sample of database-driven code running nicely on my own computer using an MS SQL database with code something like this to connect to it. (passwords and user ID's changed to protect the innocent)


connect_String = _
"Data Source = mysource;User ID=joeblow;Password=monkey;database=Reservation"
db_conn = New SqlConnection(connect_String)


Now, I want it to run on a web server, but there doesn't seem to be any simple "click here to upload your database without tearing your hair out in frustration" button. Only an option to "add ODBC data source" which has the following fields:
data source name(dsn): ________
ODBC Driver Name: SQL Server (this value cannot be changed)
DSN Description: ________
Associated SQL Server:_________
Default Database Name:_________

Without any option to upload any database files, though if I go into file manager, I notice that there is an MSSQL folder, which I assume I should be uploading the database into. But which file(s) from my database should I upload and what should I fill the blanks above in with? Thanks in advance. Do I have to change the connection code?

View 4 Replies View Related

The SQL Server Is Not On The Same Machine As The Asp Website

Jun 1, 2007

Hi, I'm new in asp.net and I have few questions.
My hoster have the SQL server and the webserver on different machine. I need to use a login  to restrict acces to some  webpages and I see that asp.net is storing that data in App_data/ASPNETDB.MDF which have the connection string set to local server. Can asp store that data on a remote database?
 

View 2 Replies View Related

SQL Server ---- Deploying A WebSite

Jun 25, 2007

Since from using my local host to view my website, I am assuming I already have SQL Server installed on my computer? Is it possible to have users access my website files directly onto there own computer, say if they type my ip address or domain name into their address bar?  What I am actually wanting to do is to host my website from my home computer... Any ideas, or good slash easy to understand articles on how to do this?

View 8 Replies View Related

How Do I Access The SQL Server From A Website.

Feb 2, 2004

How do I access the SQL server from a website, using my Machine Account, not the ASP.NET account?

thanks.

.intrino.

View 5 Replies View Related

Copying SQL Server Website To CD

Apr 10, 2005

Hi!
Not sure if this is the right place to post. I need to copy a website that I created on a CD. It is using SQL Server as the database and VB, ASP as front end. However, the problem is that I need to copy it in such a way so that it can be viewed from the CD itseld without needing MSDE or SQL Server. Need help.
Thanks.

View 3 Replies View Related

SQL Server As A Back End To A Website

Jun 15, 2006

Hi all
Hope you can help.
I've been using MS Access as a backend content server on websites for some time. However, I want to move to Sql Server but am struggling a bit with some of the concepts.

I want two types of users of the website.
1 User who can view data as a iusr_guest type user (no login)
2 can view/ edit data as a datawriter (website administrator).

With Access I would simply have a table or another db containing user info. If a user logged in and was accepted then a IIS user session would be created and they could edit the db.

Any views on how this type of simple db access should be managed using sql server?

best regards

chubster

View 4 Replies View Related

Secruity Question, Putting SQL Server 2000 Or 2005 On Windows Server 2003 Running A Website

Jan 31, 2006

Where can I further educate myself on this subject?

Right off from the start I would assume that installing SQL Server 2000 or 2005 on Windows Server 2003 that is set up as a web server hosting a website would be against "best practices." Is my assumption right?

Common sense tells me to not to host a website on a pc that is also hosting my database.

View 4 Replies View Related

SQL Server 2005 Express For A Website

Mar 26, 2007

Has anyone used SQL Server 2005 on a production website?  I know that it tops out at 1GB of ram, but it is free.  Any idea how much load it will take before you need to move up to the full version?

View 1 Replies View Related

Sql Server 2000 And Website Connection

Jan 22, 2004

What application/software can be used to conect a website to a sql server 200 backend.

Thanks!!

View 1 Replies View Related

Using SQL Server To Run Social Networking Website

Mar 17, 2008

I am currently using SQL Server 2005 Express to run a social networking website on a dedicated server (Windows Server 2003, code is written in ASP.net). Obviously express is too limited to run this site, but for now I am still getting the site operational so the demands are low. Soon I will begin advertising and adding many users to the site - can anyone recommend a version of SQL Server that I would need? My programmers say I should go with enterprise, but that seems overkill (and my hosting provider - theplanet.com does not even offer it). Would workgroup be enough, or should I go with standard edition?

To be honest I do not trust my programmers experience with SQL server which is why I am asking for help here (they are outsourced from India, and I am becoming more and more convinced that I need an onshore IT manager for them - finding that is another issue...). Also, are there built in backup features with SQL Server? My programmers told me recently that they will need to put in significant work to setup a backup system, but it seems to me like one might already be built in.

Thanks for your help,
Greg

View 6 Replies View Related

Sql Server Certifcation Website Wanted

Jul 20, 2005

I am looking for sql server certifcation questions any one hasany.like dumps or some thing

View 1 Replies View Related

Timeout Exception On Sql Server Thru Website..

May 20, 2008



Hi,
I have a website where the user uploads DBF files and then i am calling a sproc to scrub the data and put them from the staging database to the production database. If the folder size small may be less that 6 it transfers the data from the staging database to the production.. But if the size of the folder is big.. more the 6 mb i get an timeout exception.. But i know the data is been put in few tables in the production databse..

for eg... if the size of the file is 33mb it takes around 15 mins or so for the sproc to process . I have tried setting the connect and commd timeout whcih has not helped.. I tried increasing the server.script time and it fails too..

this is the error in my event viewer


Error: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

No Changes made to the ClientPlan table.

Inserting records(s) in ClientPlan table.

No Changes made to ClientPlan table.

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)

at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)

at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)

at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues)

at icc.BaseClasses.DL.DLImportPlan.Import(Int32 ClientId, DateTime StartDate, DateTime EndDate, Int32 UserId) in C:Documents and SettingskroslundMy DocumentskareniccPlanStatementsiccImportDLDLImportPlan.cs:line 120

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


any help will be appreciated.

Regards
Karen

View 15 Replies View Related

Need Help On A Website Project (heavily Based On SQL Server)

Feb 26, 2007

Hi, I'm rather new here, but I would like to add the question here
since this project encompasses a lot of areas of ASP.NET (Visual Studio
2005).
My project is about a site which is heavily based on Search Option. So
basically, users will just have to fill in the forms, click search and
it will search throughout the database. For
example...
The website is about a property listing. The database (based on SQL
Server, can be created right through the Visual Studio 2005) consists
of these attributes: ID, Property Name, Property Location, Property
Cost. The user may search based on Name, Location and Cost. For the
cost, there are two forms to fill: the lowest cost allowed and the
highest cost allowed.All
these are put on the Master Page (Located on the top). When the button
Search is clicked, it will display the records that match the forms
filled, in the main page located below the Master Page.If anyone can help me with this, I'll be very grateful. Thank you very much. 

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

Can I Use SQL Server 2005 Express In A Commercial Website?

Sep 19, 2007

Does anyone know if it is legal to use SQL Server 2005 Express in a commercial website?  There is no need for SQL Server 2005 so the Express would do the job great.Thx, Viktor 

View 2 Replies View Related

The Data On The Website Cannot Be Input In The Server Database..

Mar 6, 2008

hi there..
I have write a code in the submit button using vb code so that when people key in their email.. it will be saved in my created database called test.mdf. but when i debug it, i tried to write an my email address in the textbox in my website but when i click at the submit button, the web page display the email was not enter in my database.
here is the code, can anybody help me. i'm really lost here..
 Protected Sub SubmitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim TestDataSource As New SqlDataSource()TestDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("TestConnectionString1").ToString()
 
TestDataSource.InsertCommandType = SqlDataSourceCommandType.Text
TestDataSource.InsertCommand = "INSERT INTO Email(EmailAddress, IPAddress, DateTimeStamp) VALUES (@EmailAddress,@IPAddress,@DateTimeStamp)"
 TestDataSource.InsertParameters.Add("EmailAddress", emailAddressTextBox.Text)
TestDataSource.InsertParameters.Add("IPAddress", Request.UserHostAddress.ToString())TestDataSource.InsertParameters.Add("DateTimeStamp", DateTime.Now())
 Dim rowsAffected As Integer = 0
 
Try
rowsAffected = TestDataSource.Insert()
 Catch ex As Exception
 Server.Transfer("test_problem.aspx")
 
Finally
 
TestDataSource = Nothing
 
End Try
 
If rowsAffected <> 1 ThenServer.Transfer("test_problem.aspx")
ElseServer.Transfer("Test_Confirm.aspx")
 
End If
 
 
 
End Sub

View 2 Replies View Related

SQL Cant Find Server/instance When Deploying Website.

Mar 11, 2008

Hello All, please be gentle im very new to this stuff..
So if i add a record via a sql datasource using the ConnectDB connection string it adds it the the sql 2005 database called intranet.... If i try to add to it using an onbuttonlick(Code Below) event it comes up with the "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) "I have set remote connections on and tryed it with TCP/IP and TCP/IP and Named Pipes.   SQL is installed as the default instance.
If  both ways are using the same connection string surely it should work? Im not to sure where i am going wrong here...Here is the code for the on button click event.. 'INSERT NEW EMAIL INTO NEWSLETTER TABLE




1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:

Protected Sub AddEmailButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles AddEmailButton.Click
Dim ConSTRING As String = ConfigurationManager.ConnectionStrings("ConnectDB").ConnectionString
'INSERT NEW EMAIL INTO NEWSLETTER TABLE
Dim cn As SqlConnection = New SqlConnection(ConSTRING)
Dim InsertSQL As String = "INSERT INTO Newsletter (Name, Email) VALUES (@Name, @Email)"
Dim cmd As SqlCommand = New SqlCommand(InsertSQL, cn)
cmd.Parameters.AddWithValue("@Name", (TBname.Text))
cmd.Parameters.AddWithValue("@Email", (TBemail.Text))
cn.Open()
cmd.ExecuteNonQuery()
LBLstatus.Text = "Success, Email is now on Mailing List"
cn.Close()

Below is my web.config connection string<connectionStrings>  <remove name="LocalSqlServer" />  <add name="ConnectDB" connectionString="Data Source=10.130.0.11;Initial Catalog=intranet;User ID=XXXXX;Password=XXXXX;"   providerName="System.Data.SqlClient" /> </connectionStrings>
 
Any help on this would be great as im stuck..
Best Regards
Leigh

View 5 Replies View Related







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