Showing posts with label remote. Show all posts
Showing posts with label remote. Show all posts

Thursday, March 29, 2012

Change local connection string on remote server

Hello,

I have searched every post and tried every connection string there but can't figure out how to connect to my database on my remote server. I am using Visual Developer 2005 Express Edition in C# and uploading it to a Windows server running asp.net 2.0. The domain has not resolved yet.

I am so new to this and have followed many tutorials step by step but none of them address this issue. They just show how to upload it to the server.

Do I need to use the SQL server provided by my host or can the database stay in the App_Data folder?

My local connection string works locally:

<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\add_newSQL.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />

When I uploaded to my server I changed \SQLEXPRESS to (local) as advised in the forum.

<add name="ConnectionString" connectionString="Data Source=(local);AttachDbFilename=|DataDirectory|\add_newSQL.mdf;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient" />

When I debug a page I get the <customErrors mode="Off"/>
error message even thought I have already set it in my remote web.config file which may be causing problems itself:

<configuration>

<appSettings/>

<connectionStrings>

<add name="ConnectionString" connectionString="Data Source=(local);AttachDbFilename=|DataDirectory|\add_newSQL.mdf;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

<system.web>

<customErrors mode="Off" />

<compilation debug="false" />

<authentication mode="Windows" />

</system.web>

</configuration>

Thanks for any help you can offer. I wish I could find someone to hire to do this part for me or teach me how over the phone. Any suggestions?

You are running SQL Express on your development system (your local computer). Are you running SQL Express on the web server?

Thanks,
Bryan

|||Having this same, problem!!!!!|||So the same question to you, as the question wasn′t answered by the original poster, are you running SQL Server Express on the WebServer ?

Jens K. Suessmeyer.

http://www.sqlserver2005.de

Sunday, March 25, 2012

change distributor ?

Hi There

Ok i have the following setup.

Server 1 - OLTP publisher
Server 2 - Remote Distributor
Server 3 - Warehouse subscriber

Server 4 - New Server (new computer name etc, brand new).

I need Server 4 to be the new remote distributor for Server 1's publication.

I could disable replication and reconfigure from scratch with new server 4 as distributor.
Problem OLTP tons of data , downtime required for initial snapshot to long.

How can i do this without having to completely reconfigure replication , that is minimal downtime.

ThanxUnfortunately, there is not a way to just switch out the Distributor without reconfiguring. The good news, however, is that you can probably do this without too much fuss.

Since the Publisher and Subscriber will remain the same, you should not need to reinitialize the Subscriber; it already has all of the published data. The following should get you where you want to go:

1) Configure Server 4 as a Distributor and enable Server 1 as a Publisher.

2) Generate a script to create your publication(s) on Server 1.

3) Quiesce the old system by making sure that all replicated data has been distributed to the Subscriber.

4) Drop the subscription(s) on Server 3.

5) Disable replication on Server 1.

6) Reconfigure replication on Server 1 with Server 4 as the Distributor.

7) Run the scripts to recreate the publication(s).

8) Add the subscription(s) on Server 3, but use the no_sync option (which means that the Subscriber already has the data).

9) Start allowing changes to the replicated data.

Phillip Garding

|||Hi Phillip

Thank you very much for your input, sorry it has taken so long to reply.

The no_sync option is the trick, i will try test this scenario.

Thanx again

Saturday, February 25, 2012

Cerating and updating new record using ADO

Hi, i want to create new record in remote accsess db using ADO. I'm using this code:

VB:
------------------------
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cnn = New ADODB.Connection
Set rs = New ADODB.Recordset

cnn.Open "Provider=MS Remote;Remote Server=http://www.xyz.com;" & "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=c:\Inetpub\wwwroot\biblio.mdb;"
rs.Open "SELECT * From USERS", cnn, adOpenKeyset, adLockOptimistic, adCmdText

rs.AddNew
rs("Name") = "Jon"
rs("PhoneNR") = "00375221"
rs.Update
------------------------

error apears when i updating recrodset:

'-21474671259' operation must use an updateable query

Why ??Originally posted by fizikas
Hi, i want to create new record in remote accsess db using ADO. I'm using this code:

VB:
------------------------
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cnn = New ADODB.Connection
Set rs = New ADODB.Recordset

cnn.Open "Provider=MS Remote;Remote Server=http://www.xyz.com;" & "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=c:\Inetpub\wwwroot\biblio.mdb;"
rs.Open "SELECT * From USERS", cnn, adOpenKeyset, adLockOptimistic, adCmdText

rs.AddNew
rs("Name") = "Jon"
rs("PhoneNR") = "00375221"
rs.Update
------------------------

error apears when i updating recrodset:

'-21474671259' operation must use an updateable query

Why ??

see the following article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;175168