This topic is locked
[SOLVED]

 SQL Server not Found when Updating

11/3/2009 5:40:48 PM
ASPRunnerPro General questions
P
paulwebb author

First project on ASPRunner. Great so far, easy/quick but ... when trying to edit or add I have the error:
[Microsoft][SQL Native Client][SQL Server]Could not find server 'BG***' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
We can't work out why - server can be found to retreive/view!

Admin 11/3/2009

Tell us more about your environment.
Are you connecting to the linked server?

N
neil.robinson 11/5/2009



Tell us more about your environment.
Are you connecting to the linked server?


I am also working on this project, so will continue from here.
The SQL server was provided for us by a third party, for running our business management software, which this project will tie in with. Sys.servers contains one entry, but this does not match the machine name of the server it is on. This has never caused problems with any other application that uses the exact same DSN, so I'm at a loss to understand why ASPRunner is giving this error!
The SQL server enviroment is as follows:

Microsoft SQL Server Management Studio 9.00.3042.00

Microsoft Analysis Services Client Tools 2005.090.3042.00

Microsoft Data Access Components (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710)

Microsoft MSXML 2.6 3.0 5.0 6.0

Microsoft Internet Explorer 8.0.6001.18702

Microsoft .NET Framework 2.0.50727.3082

Operating System 5.2.3790
The web application lives on a Server 2003 SP2 machine, running IIS 6.

Admin 11/5/2009

NeilR,
if you have other applications working properly on the same server you can simply copy and paste connection string to ASPRunnerPro project. Connection string can be found in include/dbconnection.asp file.

N
neil.robinson 11/6/2009



NeilR,
if you have other applications working properly on the same server you can simply copy and paste connection string to ASPRunnerPro project. Connection string can be found in include/dbconnection.asp file.


By other applications, I meant Excel and Access <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=45214&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I currently have the connection string set as:
strConnection = "Driver={SQL Native Client};Server=BGEF1;Database=efacdb;Uid=**;Pwd=**;"
I have tried a few different connection strings, and all are giving the same error.

N
neil.robinson 11/6/2009

Ahhhh it seems I've found one that works!
strConnection = "Provider=SQLNCLI;Server=BGEF1;Database=efacdb;Uid=;Pwd=;"

Admin 11/6/2009

Thanks for the update!

P
paulwebb author 11/11/2009

OK - Thanks Admin for the idea to use a connection string that works for another app - and thanks Neil for finding one that did/does. That got us working but in a clunky way.
I investigated further and have the answer of WHY - which may help others
My previous connection - that worked for retrieval but not update: I did not open up the options on the SQL connection dialogue, which made a connection to the (default) db on the target server - the db I wanted!
BUT - Now that I've opened up 'options' and explicitly declared the db, the connection string generated by ASPRunner is quite different:
(Default) db:
strConnection = "DRIVER=SQL Server;SERVER=B;UID=****;PWD=;APP=Xlinesoft.com AspRunner Professional;WSID=*"
Declare(same)db:
strConnection = "Provider=sqloledb;Data Source=B**
;Initial Catalog=*
;User Id=;Password=;"
Guess what! - the string generated with decalred db WORKS for updates as well.
SO: Open the options and declare DB specifically when making SQL connections

A
alvin33 12/12/2009



First project on ASPRunner. Great so far, easy/quick but ... when trying to edit or add I have the error:
[Microsoft][SQL Native Client][SQL Server]Could not find server 'BG***' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
We can't work out why - server can be found to retreive/view!


Hi

Which version your using.I think your not using SQL server 2008, may be you used old version.tats why you facing this problem. so sad of you.. sorry i cant help you.
tower light"]tower light[/url]