Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Tuesday, March 27, 2012

Connecting to SQL Server 2000 thru a VPN?

Is this even possible?
I'm coding a VB.NET WinForms app and an ASP.NET app that will access a MS
SQL 2000 Server. I've been told that when I move into a "production"
environment that I must go thru a VPN. I'm no VPN expert, but this doesn't
make much sense to me especially since the remote clients running my VB.NET
WinForms app may not have teh VPN setup.
If VPN can be used as a tunnel to access a SQL 2000 Server, can someone tell
me what needs to be in place on the client side and what would I use for a
connection string to get to the SQL 2000 Server thru the VPN.
I can't find any info on MSDN that even mentions how to connect to a SQL
2000 Server thru VPN.
Thanks, Rob.
Hi Rob,
The VPN session needs to be established prior to executing your VB.NET
app. There's not a specific connection string to do this.
Here's a sample kb article on how to setup a VPN with our firewall server ,
ISA Server.
837355 How to configure a VPN server by using Internet Security and
http://support.microsoft.com/?id=837355
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

connecting to SQL Server 2000 from a VB.net app using ADO.net

Hi
I can connect from my app to sql server on the local lan, but I can't connect over the
Internet. I can't create a remote connection in Enterprise Manager. However, I can
ping the IP address of the server just fine.
The app uses the following connect string:
Provider=SQLOLEDB;User
ID=******;Password=******;Server=******;Database=* *****;Network Address=******
Where 'Network Address' = the IP address of the machine where SQL Server is
installed.
This connect string works great from any machine connected to the same lan as the
SQL Server machine. However, whenever I try to connect across the Internet (from my
home machine, using the exact same software and connect string), I take the
following error:
Client unable to establish connection ConnectionOpen(CreateFile()
Question 1: Does anybody have any suggestions as to why I can connect over the LAN
but not over the Internet? I suspect some networking thing, like a firewall on the
lan where I am trying to connect, but I am not a networking expert.
Question 2: Does anyone have any opinion about whether this is a valid DBIO
technique? Most databases that are accessed over the Internet have thin-client
interfaces implemented in front of them. I have never tried to do this from a Windows
fat-client, and I suspect very poor performance and excess resource utilization on
the server
Any help or article will be appriciated
In terms of connectivity issues over the Internet, firewall
issues would be my first guess. You may want to take a look
at the following article:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
In terms of the application issues, it depends on the app.
The resource problems on the database server are most often
due to coding issues, not really what type of client is
used. Either can perform well or perform poorly depending on
how they are coded.
-Sue
On Thu, 15 Apr 2004 09:56:07 -0700, "Lisa Jones"
<anonymous@.discussions.microsoft.com> wrote:

>Hi
>I can connect from my app to sql server on the local lan, but I can't connect over the
>Internet. I can't create a remote connection in Enterprise Manager. However, I can
>ping the IP address of the server just fine.
>The app uses the following connect string:
>Provider=SQLOLEDB;User
>ID=******;Password=******;Server=******;Database= ******;Network Address=******
>Where 'Network Address' = the IP address of the machine where SQL Server is
>installed.
>This connect string works great from any machine connected to the same lan as the
>SQL Server machine. However, whenever I try to connect across the Internet (from my
>home machine, using the exact same software and connect string), I take the
>following error:
>Client unable to establish connection ConnectionOpen(CreateFile()
>Question 1: Does anybody have any suggestions as to why I can connect over the LAN
>but not over the Internet? I suspect some networking thing, like a firewall on the
>lan where I am trying to connect, but I am not a networking expert.
>Question 2: Does anyone have any opinion about whether this is a valid DBIO
>technique? Most databases that are accessed over the Internet have thin-client
>interfaces implemented in front of them. I have never tried to do this from a Windows
>fat-client, and I suspect very poor performance and excess resource utilization on
>the server
>Any help or article will be appriciated
sqlsql

connecting to SQL Server 2000 from a VB.net app using ADO.net

Hi
I can connect from my app to sql server on the local lan, but I can't connec
t over the
Internet. I can't create a remote connection in Enterprise Manager. However,
I can
ping the IP address of the server just fine.
The app uses the following connect string:
Provider=SQLOLEDB;User
ID=******;Password=******;Server=******;
Database=******;Network Address=****
**
Where 'Network Address' = the IP address of the machine where SQL Server is
installed.
This connect string works great from any machine connected to the same lan a
s the
SQL Server machine. However, whenever I try to connect across the Internet (
from my
home machine, using the exact same software and connect string), I take the
following error:
Client unable to establish connection ConnectionOpen(CreateFile()
Question 1: Does anybody have any suggestions as to why I can connect over t
he LAN
but not over the Internet? I suspect some networking thing, like a firewall
on the
lan where I am trying to connect, but I am not a networking expert.
Question 2: Does anyone have any opinion about whether this is a valid DBIO
technique? Most databases that are accessed over the Internet have thin-clie
nt
interfaces implemented in front of them. I have never tried to do this from
a Windows
fat-client, and I suspect very poor performance and excess resource utilizat
ion on
the server
Any help or article will be appriciatedIn terms of connectivity issues over the Internet, firewall
issues would be my first guess. You may want to take a look
at the following article:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
In terms of the application issues, it depends on the app.
The resource problems on the database server are most often
due to coding issues, not really what type of client is
used. Either can perform well or perform poorly depending on
how they are coded.
-Sue
On Thu, 15 Apr 2004 09:56:07 -0700, "Lisa Jones"
<anonymous@.discussions.microsoft.com> wrote:

>Hi
>I can connect from my app to sql server on the local lan, but I can't conne
ct over the
>Internet. I can't create a remote connection in Enterprise Manager. However
, I can
>ping the IP address of the server just fine.
>The app uses the following connect string:
>Provider=SQLOLEDB;User
> ID=******;Password=******;Server=******;
Database=******;Network Address=***
***
>Where 'Network Address' = the IP address of the machine where SQL Server is
>installed.
>This connect string works great from any machine connected to the same lan
as the
>SQL Server machine. However, whenever I try to connect across the Internet
(from my
>home machine, using the exact same software and connect string), I take the
>following error:
>Client unable to establish connection ConnectionOpen(CreateFile()
>Question 1: Does anybody have any suggestions as to why I can connect over
the LAN
>but not over the Internet? I suspect some networking thing, like a firewall
on the
>lan where I am trying to connect, but I am not a networking expert.
>Question 2: Does anyone have any opinion about whether this is a valid DBIO
>technique? Most databases that are accessed over the Internet have thin-cli
ent
>interfaces implemented in front of them. I have never tried to do this from
a Windows
>fat-client, and I suspect very poor performance and excess resource utiliza
tion on
>the server
>Any help or article will be appriciated

Connecting to SQL Server 2000 from a VB 6.0 app using ADO

How to connect to real ip such as 202.28.94.10 from DCHP ip by use VB 6 .. I don't know about to use connection string ...
My PC is insatalled My SQL Server2000 and has ip 10.98.10.97 that is DHCP ip and another ones is installed the same but that it real ip. Both PC can't to see them together in network

This problem make my first PC can't access database to another one.
Help me plssss...I'm not entirely certain I understood your question. It appears that your SQL server is a DHCP client (and thus it is possible that the IP address will periodically change due to a reboot or a lease renewal (should not happen often, but it is possible).

Is it not possible to connect to the server via its name instead of the IP? Ie, use the DNS server to resolve the IP address?

On the other hand, re-reading your question seems to indicate that you have 2 client workstations, one DHCP and one static. It appears that the static IP client can connect to SQL and the DHCP client cannot. If that is the case, then you appear to have a network issue unrelated to SQL and you must work with the network admin to ensure that connectivity is not being blocked by routing rules.

If I have misunderstood your question, please forgive me.

Sorry, I guess I need a bit more info to help.

Regards,

Hugh Scott

Originally posted by cs423326
How to connect to real ip such as 202.28.94.10 from DCHP ip by use VB 6 .. I don't know about to use connection string ...
My PC is insatalled My SQL Server2000 and has ip 10.98.10.97 that is DHCP ip and another ones is installed the same but that it real ip. Both PC can't to see them together in network

This problem make my first PC can't access database to another one.
Help me plssss...|||Hi hmscott .
What is connection string in VB
My connection string to DHCP ip is "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=G7;Data Source=NUT"

when I will change Data Source from NUT to 10.98.10.97 (This is My DHCP Client IP) it work...
But when i change to Static ip (202.xxx.xxx.xxx) it does not work
How will i do??Please tell me about connection string that can be access to SQL Server..
thx|||Some things to test:

1. Can you Ping the static IP from your workstation (Ping 202.xxx.xxx.xxx).

If not, you need to see your network admin.

2. If you have query analyzer on your client, can you log in to the static IP server?

Again, iff not, you need to see your network admin.

HTH, my understanding gets much fuzzier once you get down to the network layer...

Regards,

Hugh Scott

Originally posted by cs423326
Hi hmscott .
What is connection string in VB
My connection string to DHCP ip is "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=G7;Data Source=NUT"

when I will change Data Source from NUT to 10.98.10.97 (This is My DHCP Client IP) it work...
But when i change to Static ip (202.xxx.xxx.xxx) it does not work
How will i do??Please tell me about connection string that can be access to SQL Server..
thx|||Hi again hmscott.
I ping the static ip from my PC is work..
and I can't use query analyzer log in to static ip server

..my PC (installed SQL Server 2000) and the static ip PC (installed the same) not in the same network ...then Both of them can't connect through SQL Tools.

How can I solve this problem??
and How can I code to connect them with VB?

Please help me again...
Thx.|||Perhaps it would help if you posted the actual error message text. I suggest that you try to set up a registration for the other machine in SQL Enterprise Manager and then copy the text of the error message and post it here|||thx MealinA

This is error message when I tried to Register with SQL Enterprise Manager:

xxx.xxx.xxx.xxx-Login fail for user 'userName'.Reason :Not Associated with a trusted SQL Server Connection;

and

and this is error message when i tried to create DSN :

Connection failed:
SQL State:'28000'
SQL Server Error:18452
[Microsoft][ODBC SQL Server Driver][SQL Server]Login fail for user 'user'.Reason :Not Associated with a trusted SQL Server Connection.

Help me plsss...|||See if you can connect with this connection string:

"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=<sa password>;Initial Catalog=G7;Data Source=<ip address>"

If this connects OK then your problem is authentication. I can give you some advice if that is the case...|||Hi MealinA.
I tried to connect my SQL Server with a connection string :
"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=<sa password>;Initial Catalog=G7;Data Source=<ip address>"

but is not work ...
Error :

Runtime error 'xxxxx'
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied.

How can I solve that??|||did you replace <sa password> with the sa password for your server and <ip address> with the ip address for your server in the connection string before trying it?|||Yes I do,MealinA.
But It does not work..
and if I tried to connect with my user(created) it show the same result..|||On the server if you go (start->run) svrnetcn.exe and make sure only TCP/IP is listed under enabled protocols. Click on TCP/IP then Properties. The default port should be 1433 and the hide server box should be unchecked.

Also in SQL-EM on the server choose the local machine and then go (Tools->SQL Server Configuration Properties). Go to the Security tab and check that Authentication is set to SQL Server and Windows.

On the client go (start->run) cliconfg.exe and make sure that TCP/IP is the only (or at least the first) protocol listed. Click on TCP/IP then Properties. The default port should be 1433.

Tip: (This assumes you have MDAC 2.6 or higher on your CLIENT pc) Something I do is to use the Alias tab to set and alias for the server. Click Add, then enter MySQLServer in the Server alias box. Choose TCP/IP in the Network Libraries list. Under Connection parameters set Server name to <your server ip address> and check Dynamically determine port. Then use MySQLServer in the connection string. This means if the server ip address changes you can run cliconfg and change the alias without needing to change the connectiion string.

If this is all set up then there is no reason why the client should not connect to the server from SQL Server's perspective. If it still will not connect then I would suggest you carefully analyse your network configuration on the computers involved.

Thursday, March 22, 2012

connecting to remote server

Hi friends
we've C# app that connects a sql server 2005. we've new requests from client that when users go offsite they still want use our app and connect to sql server.
my question is how can we connect to sql server remotely ?
is it using TCP/IP protocol ? if so how do we do that ?
Thanks for ur help.

Use SQL Server Configuration Manager, select protocols for your instance. On the right side, enable TCP protocol. You need restart the sql server. If you have firewall, don't forget to put your tcp port into exception, (also UDP port 1434 for sql browser if you have a named instance.)

|||Thanks for that Hong.
i've one more question on this.
what should my connection string contain ? should it contain IP address for server name ?
Thanks again|||btw we use patterns and practices library for our database connections.|||Either IP address or server name should work if your DNS works correctly.
Thanks.|||

Thank you very much for ur replies Hong.

still need some clarification as am not fully aware how DNS works .

currently in our connections string we specify our sql server name as "mallu" and other info like database etc.,(btw we use enterprise library for data access)

are you saying that once we open port on our server and allow remote connects abv connection string just works ? i mean say if we our server is in new zealand and user goes to say australia and he still be able connect ?

Thanks for clarification .

much appreciated you can point me to some resource on these issues on net

|||

Hi prk,

DNS is the Domain Name System -- essentially the directory service that translates your hostnames into IP address. Your network probably has one and your network admin should be able to give you more info.

Regardless of the geography, if your server is configured to listen to a remote protocol and the firewall (if any) is configured properly, you should be able to connect from your client app. The BOL contains some great information on how to do so:

http://msdn2.microsoft.com/en-us/library/ms190608.aspx
http://msdn2.microsoft.com/en-us/library/ms187853.aspx

Also, check out this tutorial on connecting to the database:

http://msdn2.microsoft.com/en-us/library/ms345318.aspx

Il-Sung.

|||Il-Sung
wonderful mate. thank you very much for those links.
am looking something like that.will go thru those articles.
Thanks again.

Monday, March 19, 2012

Connecting to MSDE from client

We are using MSDE as a cheap datastore in our client/server app. MSDE is installed only on the server and both the server and the clients connect to it from their machines.

When we deploy on Windows XP, we see that our code running on the server can access MSDE, but our code running on a client machine cannot connect to MSDE.

The clients are able to connect on Windows 2000 ... can anyone help me understand this ?

Thanks in advance,

ethan

MSDE only allow local access.

Connecting to Local Database after Application Install

I have created an application which uses a SQL Express database. The program runs fine on the the computer where I built the app, however when I install the app on another computer I get an error telling me that under default SQL Express does not allow remote connections. The problem is that I dont want a remote connection I want a local connection, the database file is on the commputer. How can do get my application to look for the database on the local machine.

My connection string is:

Data Source=(local)\SQLEXPRESS;Initial Catalog="C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\PLDAQ.MDF";Integrated Security=True

I have made sure that the file is in the correct directory.

Any help would be greatly appretiated

hi,

the folder you are referencing is not a "standard" one in the "traditional" sense of SQL Server, and you can get problems if the account running the instance is not able to access that path... and anyway you should reference the intital catalog in the connection string via the "logical" name and not the physical primary data file name, thus
Data Source=(local)\SQLEXPRESS;Initial Catalog=dbLogicalFileName;Integrated Security=True
or use the AttachDBFilename feature of the User Instances mode..

try modifying the connection string to see if you are granted connection to the instance you are dealing with, as the exception you are reporting is quite a generic connection exception..

regards

|||

Andrea

I still have the same problem, I have updated my connection string to this:

Data Source = .\SQLEXPRESS;AttachDBFilename = [DataDirectory]\PLDaq.mdf;Integrated Security = True; UserInstance = False

I have managed to get arround the error by changeing the name of the non-design computer to mach the name of the design computer, this however, as I am sure you will agree, is only temporary as I don't want to have to change the name of every computer that I install this application on, what do I need to do to rectify this situation.

|||

hi,

as you are not using "User Instances", I'd not go for the AttachDBFileName property of the connection string.. I'd attach/create the database once and then I'd go for the "traditional" Database=yourDbName property of the connection string...

I have managed to get arround the error by changeing the name of the non-design computer to mach the name of the design computer

do you mean by that you "named" the destination computer the same as your dev pc? this is obviously not "mandatory"...

what is your |DataDirectory| value?

regards

|||

do you mean by that you "named" the destination computer the same as your dev pc? this is obviously not "mandatory"...

Unfortunatly this is the only way it will not generate the error posted above. Like I said the program is looking for a remote connection but I want a local one. So I tricked it into thinking that it was running on the dev computer by changeing the name. I will agree that this is obviously not convient, but that is why I am posting I just cant figure out how to fix it.

The |DataDirectory| tells the connection to look in the bin\debug folder during dev time, and also to look into the bin\data folder at run time, after installation obviously. So when the program is installed and all data files are stored in the (AppPath)\bin\data directory and that is where the program is supposed to look for the data files (e.g. Database and Log files), however, if the non dev computer has a different name it trys to find the dev computer to connect to the database, a remote connection, It cant do this as it is not connected to any network.

I have tryed the traditional Database = yourDbName and that causes the same problem

Also There may come a time when I want to use User Instances, but for the time being I just want the thing to work.

|||

PEng1 wrote:

Unfortunatly this is the only way it will not generate the error posted above. Like I said the program is looking for a remote connection but I want a local one. So I tricked it into thinking that it was running on the dev computer by changeing the name. I will agree that this is obviously not convient, but that is why I am posting I just cant figure out how to fix it.

the fix is using

Data Source = .\SQLEXPRESS or Data Source = (Local)\SQLEXPRESS property in the connection string...

here you have to specify the instance you have to connect to, and you can provide "." and/or "(Local)" for "local" connections"...

The |DataDirectory| tells the connection to look in the bin\debug folder during dev time, and also to look into the bin\data folder at run time, after installation obviously. So when the program is installed and all data files are stored in the (AppPath)\bin\data directory and that is where the program is supposed to look for the data files (e.g. Database and Log files), however, if the non dev computer has a different name it trys to find the dev computer to connect to the database, a remote connection, It cant do this as it is not connected to any network.

pay attention to your "custom data folder"... consider that the account running the SQLExpress intstance required adeguate NTFS permissions to that folder.. and consider Vista "headaches"/requirements with regard writing in Program Files folder...

regards

|||

Andrea,

I guess that I had the answer for a while and just didn't bother to check if it would work with a different name, or I changed something and just don't remeber what, probably the latter of the two, either way, the problem is resolved and I am greatly indebted for all of your help. Thanks a lot.

This program will be run on Windows 2000 for quite a while but it will eventually have to be moved to Vista or higher, what "headaches" are you refering to, I am not at all familiar with Vista since the company I work for still has some machines that are running 95 and One that is running DOS, yeah thats right I said DOS. I guess however that I should probably read up on the New OS any recomended reading?

|||

hi,

PEng1 wrote:

Andrea,

I guess that I had the answer for a while and just didn't bother to check if it would work with a different name, or I changed something and just don't remeber what, probably the latter of the two, either way, the problem is resolved and I am greatly indebted for all of your help. Thanks a lot.

This program will be run on Windows 2000 for quite a while but it will eventually have to be moved to Vista or higher, what "headaches" are you refering to, I am not at all familiar with Vista since the company I work for still has some machines that are running 95 and One that is running DOS, yeah thats right I said DOS. I guess however that I should probably read up on the New OS any recomended reading?

start reading at http://technet.microsoft.com/en-us/windowsvista/aa905108.aspx, http://technet.microsoft.com/en-us/windowsvista/aa906021.aspx, ....

and look in this forum for Vista troubles with UAC..

regards

Connecting to Local Database after Application Install

I have created an application which uses a SQL Express database. The program runs fine on the the computer where I built the app, however when I install the app on another computer I get an error telling me that under default SQL Express does not allow remote connections. The problem is that I dont want a remote connection I want a local connection, the database file is on the commputer. How can do get my application to look for the database on the local machine.

My connection string is:

Data Source=(local)\SQLEXPRESS;Initial Catalog="C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\PLDAQ.MDF";Integrated Security=True

I have made sure that the file is in the correct directory.

Any help would be greatly appretiated

hi,

the folder you are referencing is not a "standard" one in the "traditional" sense of SQL Server, and you can get problems if the account running the instance is not able to access that path... and anyway you should reference the intital catalog in the connection string via the "logical" name and not the physical primary data file name, thus
Data Source=(local)\SQLEXPRESS;Initial Catalog=dbLogicalFileName;Integrated Security=True
or use the AttachDBFilename feature of the User Instances mode..

try modifying the connection string to see if you are granted connection to the instance you are dealing with, as the exception you are reporting is quite a generic connection exception..

regards

|||

Andrea

I still have the same problem, I have updated my connection string to this:

Data Source = .\SQLEXPRESS;AttachDBFilename = [DataDirectory]\PLDaq.mdf;Integrated Security = True; UserInstance = False

I have managed to get arround the error by changeing the name of the non-design computer to mach the name of the design computer, this however, as I am sure you will agree, is only temporary as I don't want to have to change the name of every computer that I install this application on, what do I need to do to rectify this situation.

|||

hi,

as you are not using "User Instances", I'd not go for the AttachDBFileName property of the connection string.. I'd attach/create the database once and then I'd go for the "traditional" Database=yourDbName property of the connection string...

I have managed to get arround the error by changeing the name of the non-design computer to mach the name of the design computer

do you mean by that you "named" the destination computer the same as your dev pc? this is obviously not "mandatory"...

what is your |DataDirectory| value?

regards

|||

do you mean by that you "named" the destination computer the same as your dev pc? this is obviously not "mandatory"...

Unfortunatly this is the only way it will not generate the error posted above. Like I said the program is looking for a remote connection but I want a local one. So I tricked it into thinking that it was running on the dev computer by changeing the name. I will agree that this is obviously not convient, but that is why I am posting I just cant figure out how to fix it.

The |DataDirectory| tells the connection to look in the bin\debug folder during dev time, and also to look into the bin\data folder at run time, after installation obviously. So when the program is installed and all data files are stored in the (AppPath)\bin\data directory and that is where the program is supposed to look for the data files (e.g. Database and Log files), however, if the non dev computer has a different name it trys to find the dev computer to connect to the database, a remote connection, It cant do this as it is not connected to any network.

I have tryed the traditional Database = yourDbName and that causes the same problem

Also There may come a time when I want to use User Instances, but for the time being I just want the thing to work.

|||

PEng1 wrote:

Unfortunatly this is the only way it will not generate the error posted above. Like I said the program is looking for a remote connection but I want a local one. So I tricked it into thinking that it was running on the dev computer by changeing the name. I will agree that this is obviously not convient, but that is why I am posting I just cant figure out how to fix it.

the fix is using

Data Source = .\SQLEXPRESS or Data Source = (Local)\SQLEXPRESS property in the connection string...

here you have to specify the instance you have to connect to, and you can provide "." and/or "(Local)" for "local" connections"...

The |DataDirectory| tells the connection to look in the bin\debug folder during dev time, and also to look into the bin\data folder at run time, after installation obviously. So when the program is installed and all data files are stored in the (AppPath)\bin\data directory and that is where the program is supposed to look for the data files (e.g. Database and Log files), however, if the non dev computer has a different name it trys to find the dev computer to connect to the database, a remote connection, It cant do this as it is not connected to any network.

pay attention to your "custom data folder"... consider that the account running the SQLExpress intstance required adeguate NTFS permissions to that folder.. and consider Vista "headaches"/requirements with regard writing in Program Files folder...

regards

|||

Andrea,

I guess that I had the answer for a while and just didn't bother to check if it would work with a different name, or I changed something and just don't remeber what, probably the latter of the two, either way, the problem is resolved and I am greatly indebted for all of your help. Thanks a lot.

This program will be run on Windows 2000 for quite a while but it will eventually have to be moved to Vista or higher, what "headaches" are you refering to, I am not at all familiar with Vista since the company I work for still has some machines that are running 95 and One that is running DOS, yeah thats right I said DOS. I guess however that I should probably read up on the New OS any recomended reading?

|||

hi,

PEng1 wrote:

Andrea,

I guess that I had the answer for a while and just didn't bother to check if it would work with a different name, or I changed something and just don't remeber what, probably the latter of the two, either way, the problem is resolved and I am greatly indebted for all of your help. Thanks a lot.

This program will be run on Windows 2000 for quite a while but it will eventually have to be moved to Vista or higher, what "headaches" are you refering to, I am not at all familiar with Vista since the company I work for still has some machines that are running 95 and One that is running DOS, yeah thats right I said DOS. I guess however that I should probably read up on the New OS any recomended reading?

start reading at http://technet.microsoft.com/en-us/windowsvista/aa905108.aspx, http://technet.microsoft.com/en-us/windowsvista/aa906021.aspx, ....

and look in this forum for Vista troubles with UAC..

regards

Connecting to Local Database after Application Install

I have created an application which uses a SQL Express database. The program runs fine on the the computer where I built the app, however when I install the app on another computer I get an error telling me that under default SQL Express does not allow remote connections. The problem is that I dont want a remote connection I want a local connection, the database file is on the commputer. How can do get my application to look for the database on the local machine.

My connection string is:

Data Source=(local)\SQLEXPRESS;Initial Catalog="C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\PLDAQ.MDF";Integrated Security=True

I have made sure that the file is in the correct directory.

Any help would be greatly appretiated

hi,

the folder you are referencing is not a "standard" one in the "traditional" sense of SQL Server, and you can get problems if the account running the instance is not able to access that path... and anyway you should reference the intital catalog in the connection string via the "logical" name and not the physical primary data file name, thus
Data Source=(local)\SQLEXPRESS;Initial Catalog=dbLogicalFileName;Integrated Security=True
or use the AttachDBFilename feature of the User Instances mode..

try modifying the connection string to see if you are granted connection to the instance you are dealing with, as the exception you are reporting is quite a generic connection exception..

regards

|||

Andrea

I still have the same problem, I have updated my connection string to this:

Data Source = .\SQLEXPRESS;AttachDBFilename = [DataDirectory]\PLDaq.mdf;Integrated Security = True; UserInstance = False

I have managed to get arround the error by changeing the name of the non-design computer to mach the name of the design computer, this however, as I am sure you will agree, is only temporary as I don't want to have to change the name of every computer that I install this application on, what do I need to do to rectify this situation.

|||

hi,

as you are not using "User Instances", I'd not go for the AttachDBFileName property of the connection string.. I'd attach/create the database once and then I'd go for the "traditional" Database=yourDbName property of the connection string...

I have managed to get arround the error by changeing the name of the non-design computer to mach the name of the design computer

do you mean by that you "named" the destination computer the same as your dev pc? this is obviously not "mandatory"...

what is your |DataDirectory| value?

regards

|||

do you mean by that you "named" the destination computer the same as your dev pc? this is obviously not "mandatory"...

Unfortunatly this is the only way it will not generate the error posted above. Like I said the program is looking for a remote connection but I want a local one. So I tricked it into thinking that it was running on the dev computer by changeing the name. I will agree that this is obviously not convient, but that is why I am posting I just cant figure out how to fix it.

The |DataDirectory| tells the connection to look in the bin\debug folder during dev time, and also to look into the bin\data folder at run time, after installation obviously. So when the program is installed and all data files are stored in the (AppPath)\bin\data directory and that is where the program is supposed to look for the data files (e.g. Database and Log files), however, if the non dev computer has a different name it trys to find the dev computer to connect to the database, a remote connection, It cant do this as it is not connected to any network.

I have tryed the traditional Database = yourDbName and that causes the same problem

Also There may come a time when I want to use User Instances, but for the time being I just want the thing to work.

|||

PEng1 wrote:

Unfortunatly this is the only way it will not generate the error posted above. Like I said the program is looking for a remote connection but I want a local one. So I tricked it into thinking that it was running on the dev computer by changeing the name. I will agree that this is obviously not convient, but that is why I am posting I just cant figure out how to fix it.

the fix is using

Data Source = .\SQLEXPRESS or Data Source = (Local)\SQLEXPRESS property in the connection string...

here you have to specify the instance you have to connect to, and you can provide "." and/or "(Local)" for "local" connections"...

The |DataDirectory| tells the connection to look in the bin\debug folder during dev time, and also to look into the bin\data folder at run time, after installation obviously. So when the program is installed and all data files are stored in the (AppPath)\bin\data directory and that is where the program is supposed to look for the data files (e.g. Database and Log files), however, if the non dev computer has a different name it trys to find the dev computer to connect to the database, a remote connection, It cant do this as it is not connected to any network.

pay attention to your "custom data folder"... consider that the account running the SQLExpress intstance required adeguate NTFS permissions to that folder.. and consider Vista "headaches"/requirements with regard writing in Program Files folder...

regards

|||

Andrea,

I guess that I had the answer for a while and just didn't bother to check if it would work with a different name, or I changed something and just don't remeber what, probably the latter of the two, either way, the problem is resolved and I am greatly indebted for all of your help. Thanks a lot.

This program will be run on Windows 2000 for quite a while but it will eventually have to be moved to Vista or higher, what "headaches" are you refering to, I am not at all familiar with Vista since the company I work for still has some machines that are running 95 and One that is running DOS, yeah thats right I said DOS. I guess however that I should probably read up on the New OS any recomended reading?

|||

hi,

PEng1 wrote:

Andrea,

I guess that I had the answer for a while and just didn't bother to check if it would work with a different name, or I changed something and just don't remeber what, probably the latter of the two, either way, the problem is resolved and I am greatly indebted for all of your help. Thanks a lot.

This program will be run on Windows 2000 for quite a while but it will eventually have to be moved to Vista or higher, what "headaches" are you refering to, I am not at all familiar with Vista since the company I work for still has some machines that are running 95 and One that is running DOS, yeah thats right I said DOS. I guess however that I should probably read up on the New OS any recomended reading?

start reading at http://technet.microsoft.com/en-us/windowsvista/aa905108.aspx, http://technet.microsoft.com/en-us/windowsvista/aa906021.aspx, ....

and look in this forum for Vista troubles with UAC..

regards

Thursday, March 8, 2012

Connecting to an external server

Hi,
I have been developing an app using SQL Server 2000 and am ready to transfer to a server located offsite. How can I connect to this server through enterprise manager or anything else so that I can use the copydatabase wizard to move it to the live server?
Thanks
WheelzPerhaps I'm missing something here (wouldn't be the first time, I'll grant ya that ;) ) but if it's on your server network, you just add the server to your "SQL Server Group" in the enterprise manager, and then you can transfer stuff willy-nilly.

Right-click on the SQL Server Group in the console file system pane of the Enterprise Manager, then add the remote server.

Like I said, I may be missing something, but if the remote server is accessable from your network, you oughta be good to go, I would think. :?:|||Hi,
I've done what you said and it offers me to register a new instance or a new group. Either one of these doesn't let me specify an IP address to the live server.|||You should regiustering a server alias..

And that has to be added....to....Damn a network question...

I forget...

But it's good to do this in case you have to flip th ip for disaster purposes...

I'll go look...|||Check this out

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=36034&SearchTerms=server,alias,

Connecting to a SQL DB

Hi,
I have a server with MSSQL Server installed there in which I've deployed my
DB.
I've also deployed an app (programmed with C# in .net) which access that DB.
Is there any chance to access that DB without installing the SQL Client?
It is very urgent.
Many thx.
SqlClient is part of the .NET Framework -- there is no separate
install and you can't uninstall the Framework when you're using C#.
However, I'm curious as to why you have a compelling need to uninstall
it.
--Mary
On Fri, 31 Mar 2006 00:56:02 -0800, Oscar
<Oscar@.discussions.microsoft.com> wrote:

>Hi,
>I have a server with MSSQL Server installed there in which I've deployed my
>DB.
>I've also deployed an app (programmed with C# in .net) which access that DB.
>Is there any chance to access that DB without installing the SQL Client?
>It is very urgent.
>Many thx.

Wednesday, March 7, 2012

Connecting to a local database

Hi,
My problem is I have an app that uses MSDE 2000. After the install, it
asks for the name of the local database instance where you would like to
install the app. It only gives me one option, 'localhost'. I can use an
OLEDB provider to specify the actual server name but I cannot connect using
localhost. Why is this happening? I am unable to install the app using the
server name.
Thanks in advance.
J
Hi
In a SQL Serever connection string, 'localhost' is not valid. 'local' is.
'localhost' is a TCP/IP alias for 127.0.0.1
Regards
Mike
"JD" wrote:

> Hi,
> My problem is I have an app that uses MSDE 2000. After the install, it
> asks for the name of the local database instance where you would like to
> install the app. It only gives me one option, 'localhost'. I can use an
> OLEDB provider to specify the actual server name but I cannot connect using
> localhost. Why is this happening? I am unable to install the app using the
> server name.
> Thanks in advance.
> J
>
>
|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:39B7B3AA-68F6-4465-8EAE-F366069A427C@.microsoft.com...
> Hi
> In a SQL Serever connection string, 'localhost' is not valid. 'local' is.
'(local)' is valid, 'local' would only be valid is if it was created as an
alias for a valid name, using CLICONFG.EXE, or the system name happened to
be 'local'.

> 'localhost' is a TCP/IP alias for 127.0.0.1
Oddly enough, if TCP/IP is a configured protocol for the installation, SQL
Server listens to the loopback, so 'localhost' is every bit as valid as an
IP, or any other DNS name that resolves to the box in question...
However... none of it will be valid if it's a named instance, in which case
you must use the server\instance notation, as either the server name or in
an alias definition.
So if the app is hardcoded to use the servername 'localhost' (which would be
terrible design, btw) you can use CLICONFG.EXE to define 'localhost' as an
alias for server\instance... and it might even work. :-)
-Mark
[vbcol=seagreen]
> Regards
> Mike
> "JD" wrote:

Connecting to a local database

Hi,
My problem is I have an app that uses MSDE 2000. After the install, it
asks for the name of the local database instance where you would like to
install the app. It only gives me one option, 'localhost'. I can use an
OLEDB provider to specify the actual server name but I cannot connect using
localhost. Why is this happening? I am unable to install the app using the
server name.
Thanks in advance.
JHi
In a SQL Serever connection string, 'localhost' is not valid. 'local' is.
'localhost' is a TCP/IP alias for 127.0.0.1
Regards
Mike
"JD" wrote:

> Hi,
> My problem is I have an app that uses MSDE 2000. After the install, it
> asks for the name of the local database instance where you would like to
> install the app. It only gives me one option, 'localhost'. I can use an
> OLEDB provider to specify the actual server name but I cannot connect usin
g
> localhost. Why is this happening? I am unable to install the app using the
> server name.
> Thanks in advance.
> J
>
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:39B7B3AA-68F6-4465-8EAE-F366069A427C@.microsoft.com...
> Hi
> In a SQL Serever connection string, 'localhost' is not valid. 'local' is.
'(local)' is valid, 'local' would only be valid is if it was created as an
alias for a valid name, using CLICONFG.EXE, or the system name happened to
be 'local'.

> 'localhost' is a TCP/IP alias for 127.0.0.1
Oddly enough, if TCP/IP is a configured protocol for the installation, SQL
Server listens to the loopback, so 'localhost' is every bit as valid as an
IP, or any other DNS name that resolves to the box in question...
However... none of it will be valid if it's a named instance, in which case
you must use the server\instance notation, as either the server name or in
an alias definition.
So if the app is hardcoded to use the servername 'localhost' (which would be
terrible design, btw) you can use CLICONFG.EXE to define 'localhost' as an
alias for server\instance... and it might even work. :-)
-Mark
[vbcol=seagreen]
> Regards
> Mike
> "JD" wrote:
>

Sunday, February 19, 2012

Connecting from Windows (VB6.0) app to SQL on Internet

Hello,
We have a client-server application written in VB 6.0 that connects to a
SQL Server instance on the local network. We're interested to know if we are
able to use our same VB 6.0 application but connect to a SQL Server that is
hosted on a web domain. That is, if we have our SQL database hosted by a
service provider on the internet, are we able to simply change our connection
string in our application so that we connect to this SQL Server instance and
not the SQL Server on the LAN? If possible we hope to avoid having to
rewrite our application as a .NET application...
Thanks.
Yes that's doable. It's not unusual to develop applications
locally and then change the connection string to access the
"live" database.
-Sue
On Fri, 21 Jan 2005 01:17:02 -0800, aglanz
<aglanz@.discussions.microsoft.com> wrote:

>Hello,
> We have a client-server application written in VB 6.0 that connects to a
>SQL Server instance on the local network. We're interested to know if we are
>able to use our same VB 6.0 application but connect to a SQL Server that is
>hosted on a web domain. That is, if we have our SQL database hosted by a
>service provider on the internet, are we able to simply change our connection
>string in our application so that we connect to this SQL Server instance and
>not the SQL Server on the LAN? If possible we hope to avoid having to
>rewrite our application as a .NET application...
>Thanks.
|||In your connection, you would specify the IP address of the hosting server.
http://www.able-consulting.com/ADO_Conn.htm
"aglanz" <aglanz@.discussions.microsoft.com> wrote in message
news:9E786AE0-5D0C-48DA-86BC-B39F9871CC03@.microsoft.com...
> Hello,
> We have a client-server application written in VB 6.0 that connects to
a
> SQL Server instance on the local network. We're interested to know if we
are
> able to use our same VB 6.0 application but connect to a SQL Server that
is
> hosted on a web domain. That is, if we have our SQL database hosted by a
> service provider on the internet, are we able to simply change our
connection
> string in our application so that we connect to this SQL Server instance
and
> not the SQL Server on the LAN? If possible we hope to avoid having to
> rewrite our application as a .NET application...
> Thanks.
|||Hi,
Can you please let me know how did you connect vb6.0 with MS-SQLServer in a network(LAN)?Iam facing a problem of connecting MS-SQLServer with vb6.0 on the network what i mean is clients cant access the sqlserver?
Regards
Jack

Quote:

Originally posted by aglanz
Hello,
We have a client-server application written in VB 6.0 that connects to a
SQL Server instance on the local network. We're interested to know if we are
able to use our same VB 6.0 application but connect to a SQL Server that is
hosted on a web domain. That is, if we have our SQL database hosted by a
service provider on the internet, are we able to simply change our connection
string in our application so that we connect to this SQL Server instance and
not the SQL Server on the LAN? If possible we hope to avoid having to
rewrite our application as a .NET application...
Thanks.

Connecting from Windows (VB6.0) app to SQL on Internet

Hello,
We have a client-server application written in VB 6.0 that connects to a
SQL Server instance on the local network. We're interested to know if we ar
e
able to use our same VB 6.0 application but connect to a SQL Server that is
hosted on a web domain. That is, if we have our SQL database hosted by a
service provider on the internet, are we able to simply change our connectio
n
string in our application so that we connect to this SQL Server instance and
not the SQL Server on the LAN? If possible we hope to avoid having to
rewrite our application as a .NET application...
Thanks.Yes that's doable. It's not unusual to develop applications
locally and then change the connection string to access the
"live" database.
-Sue
On Fri, 21 Jan 2005 01:17:02 -0800, aglanz
<aglanz@.discussions.microsoft.com> wrote:

>Hello,
> We have a client-server application written in VB 6.0 that connects to
a
>SQL Server instance on the local network. We're interested to know if we a
re
>able to use our same VB 6.0 application but connect to a SQL Server that is
>hosted on a web domain. That is, if we have our SQL database hosted by a
>service provider on the internet, are we able to simply change our connecti
on
>string in our application so that we connect to this SQL Server instance an
d
>not the SQL Server on the LAN? If possible we hope to avoid having to
>rewrite our application as a .NET application...
>Thanks.|||In your connection, you would specify the IP address of the hosting server.
http://www.able-consulting.com/ADO_Conn.htm
"aglanz" <aglanz@.discussions.microsoft.com> wrote in message
news:9E786AE0-5D0C-48DA-86BC-B39F9871CC03@.microsoft.com...
> Hello,
> We have a client-server application written in VB 6.0 that connects to
a
> SQL Server instance on the local network. We're interested to know if we
are
> able to use our same VB 6.0 application but connect to a SQL Server that
is
> hosted on a web domain. That is, if we have our SQL database hosted by a
> service provider on the internet, are we able to simply change our
connection
> string in our application so that we connect to this SQL Server instance
and
> not the SQL Server on the LAN? If possible we hope to avoid having to
> rewrite our application as a .NET application...
> Thanks.

Friday, February 17, 2012

Connecting a web app to sql server

I have a web application running on Server A and need to connect to a SQL Server database on Server B.

In IIS on Server A, I have created a virtual directory called gdoc. For Directory Security I am using Integrated Windows Authentication. When I try to access the application, I get the following error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
/gdoc/properties/GDocProperty.asp, line 23


When I change IIS to allow anonymous access the error changes to:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
/gdoc/properties/GDocProperty.asp, line 23

Line 23 corresponds to the connection string, which is coming from a .udl file. In the .udl the connection string looks like this: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=GDoc;Data Source=TERRATAX

If I set up my web app on Server B then everything connects fine. It's running the web app on a different server that presents the problem.

This seems like it should be fairly routine, but I can't seem to figure out what I need to do.
The web app is NOT ASP.NET. It's classic .asp.

The reason for this is that the account you are using to connect to Server B(the one running SQL Server) is the IUSR_computernameServerA account (if this were ASP.NET, then the account is the ASPNET), which is the account used when you set IIS to anonymous access. In order to connect to SQL Server from Server A to Server B, you need to create an account named IUSR_computernameServerB on Server B and give this account permissions to access SQL Server. Or, better yet, use SQL authentication. Configure your SQL Server to use SQL authentication then create a SQL account and give that account permissions to the corresponding database. Then, in your connection string, use the credentials of the SQL account.

Hope this helps.|||I tried adding the account to SQL Server, but this is what I get this:

Windows NT User or Group '[domain name]/IUSR_TERRAGIS' not found.|||Have you tried SQL Authentication?

Connecting a vb6 app to a sequel 2005 database

We are currently migrating our sequel 6.5 databases to sequel 2005
We have a handful of vb6 apps that connect to the current 6.5 database.
Can anyone recommend the "best practice" for connecting vb6 apps to sequel
2005 databases ?
Thanks in advance.
Sure, but my books only discuss SQL Server, not "sequel" ;)
The ConnectionString used to connect to a SQL Server 2005 engine is very
similar to the one you're using to access a SQL Server 6.5 engine with a
couple of differences:
* First, use the new SNAC (SQL Native Client) provider instead of
SQLOLEDB. This is installed with all versions of SQL Server 2005. See
http://msdn2.microsoft.com/en-us/data/aa937705.aspx for more information.
* Next, consider that SQL Server 2005 can be installed as a named
instance. This permits you to have both SQL Server 6.5 and SQL Server 2005
installed on the same server. If you have used a named instance, you can
address it using the machine/server name followed by the instance name--like
this:
Dim con As New ADODB.Connection
con.ConnectionString = "Provider=SQLNCLI;" _
& "Server=MyServer/MySQLServer2005InstanceName;" _
& "Database=AdventureWorks;" _
& "Integrated Security=SSPI;" _
& "DataTypeCompatibility=80;" _
& "MARS Connection=True;"
con.Open
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"PhilEvans" <PhilEvans@.discussions.microsoft.com> wrote in message
news:409E884C-5165-48D1-A88B-77E802BCFC40@.microsoft.com...
> We are currently migrating our sequel 6.5 databases to sequel 2005
> We have a handful of vb6 apps that connect to the current 6.5 database.
> Can anyone recommend the "best practice" for connecting vb6 apps to sequel
> 2005 databases ?
> Thanks in advance.
>

Connecting a vb6 app to a sequel 2005 database

We are currently migrating our sequel 6.5 databases to sequel 2005
We have a handful of vb6 apps that connect to the current 6.5 database.
Can anyone recommend the "best practice" for connecting vb6 apps to sequel
2005 databases ?
Thanks in advance.Sure, but my books only discuss SQL Server, not "sequel" ;)
The ConnectionString used to connect to a SQL Server 2005 engine is very
similar to the one you're using to access a SQL Server 6.5 engine with a
couple of differences:
* First, use the new SNAC (SQL Native Client) provider instead of
SQLOLEDB. This is installed with all versions of SQL Server 2005. See
http://msdn2.microsoft.com/en-us/data/aa937705.aspx for more information.
* Next, consider that SQL Server 2005 can be installed as a named
instance. This permits you to have both SQL Server 6.5 and SQL Server 2005
installed on the same server. If you have used a named instance, you can
address it using the machine/server name followed by the instance name--like
this:
Dim con As New ADODB.Connection
con.ConnectionString = "Provider=SQLNCLI;" _
& "Server=MyServer/MySQLServer2005InstanceName;" _
& "Database=AdventureWorks;" _
& "Integrated Security=SSPI;" _
& "DataTypeCompatibility=80;" _
& "MARS Connection=True;"
con.Open
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"PhilEvans" <PhilEvans@.discussions.microsoft.com> wrote in message
news:409E884C-5165-48D1-A88B-77E802BCFC40@.microsoft.com...
> We are currently migrating our sequel 6.5 databases to sequel 2005
> We have a handful of vb6 apps that connect to the current 6.5 database.
> Can anyone recommend the "best practice" for connecting vb6 apps to sequel
> 2005 databases ?
> Thanks in advance.
>

Tuesday, February 14, 2012

Connect via sqldmo

Attempting to connect to MSDE 2000 via sqldmo w/ vb 6 app. For example,
oSqlServer.Connect sSrvName, "sa", sPswd
However, receiving the following error message "Not associated with a
trusted SQL Server connection"
I've looked on microsoft support, which offered a workaround for this error
(kb #889615). However, the workaround applied to Win98. This error is
occuring on a Win xp machine.
any help is appreciated.
hi Jim
jim wrote:
> Attempting to connect to MSDE 2000 via sqldmo w/ vb 6 app. For
> example, oSqlServer.Connect sSrvName, "sa", sPswd
> However, receiving the following error message "Not associated with a
> trusted SQL Server connection"
> I've looked on microsoft support, which offered a workaround for this
> error (kb #889615). However, the workaround applied to Win98. This
> error is occuring on a Win xp machine.
>
usually that exception means MSDE has been installed without allowing
standard SQL Server authenticated connections but trusted connections only
(that is the default)
please have a look at
http://support.microsoft.com/default.aspx?scid=kb;en-us;285097 for futher
info on how to modify the Windows registry to modify the setting..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
-- remove DMO to reply
|||Hi Andrea,
That absolutely worked! Your help is greatly appreciated. However, it
appears that I have run into another problem when attempting to attach db
files the msde installation.
I'm receiving the following error:
Error -2147216399. Device activation error. The physical file name
'C:\Program' may be incorrect.
I initially that this was due to permission error, so I included
ALLOWXDBCHAINING=1 in the setup parameters, but to no avail. Would it the
actual file location? That is, the space between "Program" and "Files"?
"Andrea Montanari" wrote:

> hi Jim
> jim wrote:
> usually that exception means MSDE has been installed without allowing
> standard SQL Server authenticated connections but trusted connections only
> (that is the default)
> please have a look at
> http://support.microsoft.com/default.aspx?scid=kb;en-us;285097 for futher
> info on how to modify the Windows registry to modify the setting..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz http://italy.mvps.org
> DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
> -- remove DMO to reply
>
>
|||hi Jim,
jim wrote:
> Hi Andrea,
> That absolutely worked! Your help is greatly appreciated. However, it
> appears that I have run into another problem when attempting to
> attach db files the msde installation.
> I'm receiving the following error:
> Error -2147216399. Device activation error. The physical file name
> 'C:\Program' may be incorrect.
if you are using DMO to perform attabch, backup, restore operations you have
to better enclose paths in square brackets like
fileName = "[c:\program files\folder with spaces\file with spaces.xxx]"
if they include spaces..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
-- remove DMO to reply
|||Hi Andrea,
Sweet. I will definitely do so. I forgot that the AttachDB() or sp_attach_db
is pretty much a wrapper for CREATE DATABASE.
Thanks again for all of your help.
"Andrea Montanari" wrote:

> hi Jim,
> jim wrote:
> if you are using DMO to perform attabch, backup, restore operations you have
> to better enclose paths in square brackets like
> fileName = "[c:\program files\folder with spaces\file with spaces.xxx]"
> if they include spaces..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz http://italy.mvps.org
> DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
> -- remove DMO to reply
>
>

Sunday, February 12, 2012

Connect to sqlexpress from network computer

Hi

Please if any one can answer.I am developing .net vb app sqlexpress database.

In single user work ok.In multiuser from other computer on network I cannot get data.Any form without data workok fine . The error I am getting is as follows.

Application attempted to perform operation not allowed by the security policy.

request for permission of type

'System.data.sqlclientpermission,system.data,

version=2.0.0.0.,culture=Normal, publickeytoken=b77a5c561934e089'

Zaabdullah

Hi Zaabdullah,

You will most likely get a better response by posting on one of the VB.NET forums. It seems that the security policy for the Assembly needs to be corrected to allow accessing resources across the network.