Showing posts with label locally. Show all posts
Showing posts with label locally. Show all posts

Sunday, March 25, 2012

Connecting to sql from Delphi 5

I try to connect (locally) to SQLServer Express from Delphi5. On my developer computer, which has Windows XP, SQLServer 2000, VisualStudio2005 (and with that, SQLExpress 2005), it is no problem. However, when I transfer my program and the database to other computers with Windows 2000/WindowsServer2003 and a more recent standalone-version of SQLExpress, I get error messages like:

'Db-Library error 10004: No connection possible: SQL Server not available or not existing'

It does not matter which protocols I activate at the Server or whether the Server Browser service is running or not.

Does anybody have an idea how this might be fixed? Or whether it is a problem of the operating system?

Didi you try making a connecting without any Delphi tools like sqlcmd.exe at the command prompt ?

HTH, Jens K. Suessemeyer.

http://www.sqlserver2005.de
|||

Yes, all MS SQL 2005 tools work.

Meanwhile I found a solution myself: Everything works fine, if I install SQL Server 2000 additionally -- the client suffices. I don't like talking to a new 2005 database via an old 2000 client library, but at least it works.

Thanks very much for helping.

Lucia Lehr

Connecting to SQL Express on a hosted site

Folks.

I just moved my domain to GoDaddy.com. When I run my website locally, everything works fine.

When I ftp it to my server space on GoDaddy.com, I get a "remote connection" error. Does anyone have an example of a connection string I should be using to connect while on the server?

Thanks!

From looking at their website, they do not appear to offer SQL Server2005 or SQL Server 2005 Express. That'd be why you're getting theerror you are. I'm getting the same dang thing on my hostingservice - 1PlanHost.com. They, for some reason, will not installSQL Express... even though ALL of these starter kits, etc. are using itby default. It's making things quite bothersome for us developers!

If anyone figures out a way to force SQL Express to run within a shared hosting enviroment, let me know!|||

Thanks for your response. GoDaddy does offer SQL Server. You can configure it once you have purchased a hosting package. What they don't offer is any incling of support for it. If I find anything out, I'll let you know.

sqlsql

Tuesday, March 20, 2012

Connecting to remote Express instance using SSMS

I have a server running SQL Server 2005 Ent. Ed. SP2 and locally, I can see
the default instance and two SQLExpress instances named 'sqlexpress' and
'officeservers', all withing SSMS, and can connect and manage them.
From my workstation, running SQL 2005 Dev, SP2, I can connect to the default
instance on that server, but cannot connect to the express instances. They
both have TCP/IP protocol enabled, along with "Allow Remote COnnections".
I have done the following:
Made myself a member of the local Admin group
Tried using the sa account to connect
nothing seems to work. What am I missing?
TIA
Todd Chittenden
Is the SQLBrowser Service enabled and started?
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Todd C" <ToddC@.discussions.microsoft.com> wrote in message
news:15C51BF6-FF25-435E-B26B-3863344FB81D@.microsoft.com...
>I have a server running SQL Server 2005 Ent. Ed. SP2 and locally, I can see
> the default instance and two SQLExpress instances named 'sqlexpress' and
> 'officeservers', all withing SSMS, and can connect and manage them.
> From my workstation, running SQL 2005 Dev, SP2, I can connect to the
> default
> instance on that server, but cannot connect to the express instances. They
> both have TCP/IP protocol enabled, along with "Allow Remote COnnections".
> I have done the following:
> Made myself a member of the local Admin group
> Tried using the sa account to connect
> nothing seems to work. What am I missing?
> TIA
> --
> Todd Chittenden
>
|||I found it not long after posting the original question:
No, the Browser service was not running. Starting that up enabled me to
connect to it. So that was the answer.
But even before the Enterprise instance was installed, (which includes the
browser service) I was not able to connect. I know I have other machines in
my domain that are running SQL Express. Should I not be able to connect to
them using my SSMS? What do I need to do to make that happen?
I assume that I need membership in the group on the local machine that bears
the SQL Express instance name?
What else? I can't rely on the Browser service in those instances.
Thanks
Todd Chittenden
"Roger Wolter[MSFT]" wrote:

> Is the SQLBrowser Service enabled and started?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Todd C" <ToddC@.discussions.microsoft.com> wrote in message
> news:15C51BF6-FF25-435E-B26B-3863344FB81D@.microsoft.com...
>
|||SQL Express by default installs as a named instance. Unless you specify the
TCP/IP port in the connection string, you need the sqlbrowser service to
connect to a named instance.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Todd C" <ToddC@.discussions.microsoft.com> wrote in message
news:F4B981A2-4B9A-443E-855B-D53B89FCE511@.microsoft.com...[vbcol=seagreen]
>I found it not long after posting the original question:
> No, the Browser service was not running. Starting that up enabled me to
> connect to it. So that was the answer.
> But even before the Enterprise instance was installed, (which includes the
> browser service) I was not able to connect. I know I have other machines
> in
> my domain that are running SQL Express. Should I not be able to connect to
> them using my SSMS? What do I need to do to make that happen?
> I assume that I need membership in the group on the local machine that
> bears
> the SQL Express instance name?
> What else? I can't rely on the Browser service in those instances.
> Thanks
> --
> Todd Chittenden
>
> "Roger Wolter[MSFT]" wrote:

Connecting to remote Express instance using SSMS

I have a server running SQL Server 2005 Ent. Ed. SP2 and locally, I can see
the default instance and two SQLExpress instances named 'sqlexpress' and
'officeservers', all withing SSMS, and can connect and manage them.
From my workstation, running SQL 2005 Dev, SP2, I can connect to the default
instance on that server, but cannot connect to the express instances. They
both have TCP/IP protocol enabled, along with "Allow Remote COnnections".
I have done the following:
Made myself a member of the local Admin group
Tried using the sa account to connect
nothing seems to work. What am I missing?
TIA
--
Todd ChittendenIs the SQLBrowser Service enabled and started?
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Todd C" <ToddC@.discussions.microsoft.com> wrote in message
news:15C51BF6-FF25-435E-B26B-3863344FB81D@.microsoft.com...
>I have a server running SQL Server 2005 Ent. Ed. SP2 and locally, I can see
> the default instance and two SQLExpress instances named 'sqlexpress' and
> 'officeservers', all withing SSMS, and can connect and manage them.
> From my workstation, running SQL 2005 Dev, SP2, I can connect to the
> default
> instance on that server, but cannot connect to the express instances. They
> both have TCP/IP protocol enabled, along with "Allow Remote COnnections".
> I have done the following:
> Made myself a member of the local Admin group
> Tried using the sa account to connect
> nothing seems to work. What am I missing?
> TIA
> --
> Todd Chittenden
>|||I found it not long after posting the original question:
No, the Browser service was not running. Starting that up enabled me to
connect to it. So that was the answer.
But even before the Enterprise instance was installed, (which includes the
browser service) I was not able to connect. I know I have other machines in
my domain that are running SQL Express. Should I not be able to connect to
them using my SSMS? What do I need to do to make that happen?
I assume that I need membership in the group on the local machine that bears
the SQL Express instance name?
What else? I can't rely on the Browser service in those instances.
Thanks
--
Todd Chittenden
"Roger Wolter[MSFT]" wrote:

> Is the SQLBrowser Service enabled and started?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Todd C" <ToddC@.discussions.microsoft.com> wrote in message
> news:15C51BF6-FF25-435E-B26B-3863344FB81D@.microsoft.com...
>|||SQL Express by default installs as a named instance. Unless you specify the
TCP/IP port in the connection string, you need the sqlbrowser service to
connect to a named instance.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Todd C" <ToddC@.discussions.microsoft.com> wrote in message
news:F4B981A2-4B9A-443E-855B-D53B89FCE511@.microsoft.com...[vbcol=seagreen]
>I found it not long after posting the original question:
> No, the Browser service was not running. Starting that up enabled me to
> connect to it. So that was the answer.
> But even before the Enterprise instance was installed, (which includes the
> browser service) I was not able to connect. I know I have other machines
> in
> my domain that are running SQL Express. Should I not be able to connect to
> them using my SSMS? What do I need to do to make that happen?
> I assume that I need membership in the group on the local machine that
> bears
> the SQL Express instance name?
> What else? I can't rely on the Browser service in those instances.
> Thanks
> --
> Todd Chittenden
>
> "Roger Wolter[MSFT]" wrote:
>

Saturday, February 25, 2012

Connecting SQL server to the net?

Hi all. Im using Visual Web developer 2005 and have successfully connected my SQL Server to Visual Web developer website. When i run it locally, its fine. But, i now would like the site to be placed on the net - but im not sure how to connect it properly in the webhost. Can someone tell me how this is done please, or a link? cheers.

You can add a connection string on web.config file

<connectionStrings>

<add name="connectioname" connectionString="server=database server;uid=username; pwd=pasword; database=databasename;"/>

</connectionStrings>

then call this connection string on your page.

string strCon = System.Configuration.ConfigurationManager.ConnectionStrings["connectionname"].ConnectionString;

I hope this will help.

|||

Ok.....im still rather confused on how exactly the databse is linked. Firstly, i have the site on a external harddrive....but ive found that the SQL server databse is placed in a totally different location - C:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\Data\Database.mdf

Surely i would have to link it some how for the site/databse to work properly on the site?

|||No ideas guys? Surely there must be a way so i can upload my SQL server database and connect it to my website? I can do it easily in Visual Web Developer in my computer....but stummped how to do it on the net.....|||

Hi,

You may follow the steps below.

First, backup you local database.

Second, get the physical folder of the database file exist on your server. From your previous post, it isC:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\Data\.

Third, restore your backup file to your server database. (Note, you have to replace theMove to Physical file nameitem in the Option tab with your real server-side database folder.)

Third, modify the connection string in your web.config file and call the string in your code by ConfigurationManager.

Thanks.

Friday, February 24, 2012

Connecting MSDE using ADO over TCPIP, XP

Gurus,
I've installed MSDE on an XP Professional server - to be used by the public
as part of a forum I'm building.
I can connect locally but fails when I connect locally using the option:
Network Library=dbmssocn
Please help me out here, I'm not a network/XP person and I'd like to get it
so that anyone can connect for testing and discussion purposes.
(I did manage to at least figure out how to enable connections to the web
server on the same machine where the forum is hosted but can't find any
switches for SQLServer..')
Mike Collier BSc( Hons) Comp Sci
Get a copy of AdoAnywhere Browser FREE if you register for the forum
quickly...
http://www.adoanywhere.com/forumCheck your NT Application Event log and verify that SQL Server is listening
on TCP.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Micke
1. Open up the Client Network Utility, located at:
c:\Windows\system32\cliconfg.exe
2. Click n the Alias Tab, make sure you add an Alias to access your MSDE
from either TCP/IP or Named Pipes.
We also use the same network library, and we have had to add the Name Pipes
Alias. This name can be any name you choose.
Peace in Christ
Marco Napoli
http://www.ourlovingmother.org
"Mike Collier" <mike@.adoanywhere.com> wrote in message
news:unqOqW52DHA.3224@.tk2msftngp13.phx.gbl...
quote:

> Gurus,
> I've installed MSDE on an XP Professional server - to be used by the
> public
> as part of a forum I'm building.
> I can connect locally but fails when I connect locally using the option:
> Network Library=dbmssocn
> Please help me out here, I'm not a network/XP person and I'd like to get
> it
> so that anyone can connect for testing and discussion purposes.
> (I did manage to at least figure out how to enable connections to the web
> server on the same machine where the forum is hosted but can't find any
> switches for SQLServer..')
> --
> Mike Collier BSc( Hons) Comp Sci
> Get a copy of AdoAnywhere Browser FREE if you register for the forum
> quickly...
> http://www.adoanywhere.com/forum
>
>