By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

VB Express SQL Express Remote Connection

P: n/a
I am migrating from VB6/Access to Visual Basic and SQL Express. I have
success writing test code on my local machine and am now setting up tests for
deployment to a server. I have installed SQL Express on a Windows 2003
Server. I can connect and create databases on the Remote Server from my
local machine using SQL Management Express, so I know Remote Access is
working.

However, I am unable to connect using a connection string within my VB
Express program. I am using the SQL Connection String Builder with the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections through the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated

Aug 22 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Cleo,

The server should be reachable by its Server name. Not as by the Jet engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microsof t.com...
>I am migrating from VB6/Access to Visual Basic and SQL Express. I have
success writing test code on my local machine and am now setting up tests
for
deployment to a server. I have installed SQL Express on a Windows 2003
Server. I can connect and create databases on the Remote Server from my
local machine using SQL Management Express, so I know Remote Access is
working.

However, I am unable to connect using a connection string within my VB
Express program. I am using the SQL Connection String Builder with the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated

Aug 23 '06 #2

P: n/a
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide me with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:
Cleo,

The server should be reachable by its Server name. Not as by the Jet engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microsof t.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I have
success writing test code on my local machine and am now setting up tests
for
deployment to a server. I have installed SQL Express on a Windows 2003
Server. I can connect and create databases on the Remote Server from my
local machine using SQL Management Express, so I know Remote Access is
working.

However, I am unable to connect using a connection string within my VB
Express program. I am using the SQL Connection String Builder with the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated



Aug 23 '06 #3

P: n/a
Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microsof t.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:
>Cleo,

The server should be reachable by its Server name. Not as by the Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microso ft.com...
>I am migrating from VB6/Access to Visual Basic and SQL Express. I have
success writing test code on my local machine and am now setting up
tests
for
deployment to a server. I have installed SQL Express on a Windows 2003
Server. I can connect and create databases on the Remote Server from
my
local machine using SQL Management Express, so I know Remote Access is
working.

However, I am unable to connect using a connection string within my VB
Express program. I am using the SQL Connection String Builder with the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated



Aug 23 '06 #4

P: n/a
I just receive the general error "This Page cannot be displayed." I get it
when I click on the link and when I google into vb-tips.com. I am using
Windows XP and Internet Exployer

"Cor Ligthert [MVP]" wrote:
Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microsof t.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:
Cleo,

The server should be reachable by its Server name. Not as by the Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microsof t.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I have
success writing test code on my local machine and am now setting up
tests
for
deployment to a server. I have installed SQL Express on a Windows 2003
Server. I can connect and create databases on the Remote Server from
my
local machine using SQL Management Express, so I know Remote Access is
working.

However, I am unable to connect using a connection string within my VB
Express program. I am using the SQL Connection String Builder with the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated



Aug 23 '06 #5

P: n/a
Cleo,

Thanks for your information one other question?

Do you use a proxy or whatever like that?
--------------------------------------------------------------------------
There is not so much text on that page by the way, it is this.

This sample is usable for more than only the Faq, but you can make that
sample yourself.
--------------------------------------------------------------------------------

Open a new project.

Click on Data -Add New DataSource and follow the wizard
Click on Data -Show Datasources
Drag from the at the left opened window your table to the form
Set in Solution Explorer the Show All files Icon to show all files

You have now a lot of samples with a strongly typed dataset

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:6B**********************************@microsof t.com...
>I just receive the general error "This Page cannot be displayed." I get it
when I click on the link and when I google into vb-tips.com. I am using
Windows XP and Internet Exployer

"Cor Ligthert [MVP]" wrote:
>Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microso ft.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:

Cleo,

The server should be reachable by its Server name. Not as by the Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microso ft.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I
have
success writing test code on my local machine and am now setting up
tests
for
deployment to a server. I have installed SQL Express on a Windows
2003
Server. I can connect and create databases on the Remote Server
from
my
local machine using SQL Management Express, so I know Remote Access
is
working.

However, I am unable to connect using a connection string within my
VB
Express program. I am using the SQL Connection String Builder with
the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated




Aug 23 '06 #6

P: n/a
I am receiving the general error This Page cannot be displayed. I receive
the error when I use the link and when I google vb-net.com. I am using
Windows XP and Internet Exployer

"Cor Ligthert [MVP]" wrote:
Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microsof t.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:
Cleo,

The server should be reachable by its Server name. Not as by the Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microsof t.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I have
success writing test code on my local machine and am now setting up
tests
for
deployment to a server. I have installed SQL Express on a Windows 2003
Server. I can connect and create databases on the Remote Server from
my
local machine using SQL Management Express, so I know Remote Access is
working.

However, I am unable to connect using a connection string within my VB
Express program. I am using the SQL Connection String Builder with the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated



Aug 23 '06 #7

P: n/a
Sorry for the double post. No I don't use a proxy.

I have added typed datasets using a local SQL Server Express instance -
these all use the Data Source=.\SQLEXPRESS and work fine. But now I want to
connect to a production Server instance named AppServer02\SQLEXPRESS. The
Add Data Source Wizard errors with the message The file
\\AppServer02\SharedDatabases\textdb.mdf is on a network path that is not
supported for database files.

Will VBExpress allow me to connect to a SQL database that is not local?

thanks for you time.

"Cor Ligthert [MVP]" wrote:
Cleo,

Thanks for your information one other question?

Do you use a proxy or whatever like that?
--------------------------------------------------------------------------
There is not so much text on that page by the way, it is this.

This sample is usable for more than only the Faq, but you can make that
sample yourself.
--------------------------------------------------------------------------------

Open a new project.

Click on Data -Add New DataSource and follow the wizard
Click on Data -Show Datasources
Drag from the at the left opened window your table to the form
Set in Solution Explorer the Show All files Icon to show all files

You have now a lot of samples with a strongly typed dataset

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:6B**********************************@microsof t.com...
I just receive the general error "This Page cannot be displayed." I get it
when I click on the link and when I google into vb-tips.com. I am using
Windows XP and Internet Exployer

"Cor Ligthert [MVP]" wrote:
Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microsof t.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:

Cleo,

The server should be reachable by its Server name. Not as by the Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microsof t.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I
have
success writing test code on my local machine and am now setting up
tests
for
deployment to a server. I have installed SQL Express on a Windows
2003
Server. I can connect and create databases on the Remote Server
from
my
local machine using SQL Management Express, so I know Remote Access
is
working.

However, I am unable to connect using a connection string within my
VB
Express program. I am using the SQL Connection String Builder with
the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated




Aug 23 '06 #8

P: n/a
Cleo,

Can you install this tool and than try to attach the file to the database
server

http://msdn.microsoft.com/vstudio/express/sql/download/

You are now using it in a kind of Access way.

I don't use that tool, but as you have done that, than your connection
string becomes something as

strConn = "Server = YourServerName/SqlExpress;Database = NorthWind;
Integrated Security = SSPI;"

I hope this helps,

Cor
"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:0B**********************************@microsof t.com...
Sorry for the double post. No I don't use a proxy.

I have added typed datasets using a local SQL Server Express instance -
these all use the Data Source=.\SQLEXPRESS and work fine. But now I want
to
connect to a production Server instance named AppServer02\SQLEXPRESS. The
Add Data Source Wizard errors with the message The file
\\AppServer02\SharedDatabases\textdb.mdf is on a network path that is not
supported for database files.

Will VBExpress allow me to connect to a SQL database that is not local?

thanks for you time.

"Cor Ligthert [MVP]" wrote:
>Cleo,

Thanks for your information one other question?

Do you use a proxy or whatever like that?
--------------------------------------------------------------------------
There is not so much text on that page by the way, it is this.

This sample is usable for more than only the Faq, but you can make that
sample yourself.
--------------------------------------------------------------------------------

Open a new project.

Click on Data -Add New DataSource and follow the wizard
Click on Data -Show Datasources
Drag from the at the left opened window your table to the form
Set in Solution Explorer the Show All files Icon to show all files

You have now a lot of samples with a strongly typed dataset

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:6B**********************************@microso ft.com...
>I just receive the general error "This Page cannot be displayed." I get
it
when I click on the link and when I google into vb-tips.com. I am
using
Windows XP and Internet Exployer

"Cor Ligthert [MVP]" wrote:

Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microso ft.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide
me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:

Cleo,

The server should be reachable by its Server name. Not as by the
Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microso ft.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I
have
success writing test code on my local machine and am now setting
up
tests
for
deployment to a server. I have installed SQL Express on a
Windows
2003
Server. I can connect and create databases on the Remote Server
from
my
local machine using SQL Management Express, so I know Remote
Access
is
working.

However, I am unable to connect using a connection string within
my
VB
Express program. I am using the SQL Connection String Builder
with
the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database
using a
connection string.

Your help is appreciated





Aug 23 '06 #9

P: n/a
Yes I can connect using the SQL Server Management Studio Express Tool.
I changed my connection to exactly what you specified and it connected.
Then I went back to my original connection string - All I had to do was
change Integrated Security = True to Integrated Security = SSPI and it works.

Thank you.

"Cor Ligthert [MVP]" wrote:
Cleo,

Can you install this tool and than try to attach the file to the database
server

http://msdn.microsoft.com/vstudio/express/sql/download/

You are now using it in a kind of Access way.

I don't use that tool, but as you have done that, than your connection
string becomes something as

strConn = "Server = YourServerName/SqlExpress;Database = NorthWind;
Integrated Security = SSPI;"

I hope this helps,

Cor
"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:0B**********************************@microsof t.com...
Sorry for the double post. No I don't use a proxy.

I have added typed datasets using a local SQL Server Express instance -
these all use the Data Source=.\SQLEXPRESS and work fine. But now I want
to
connect to a production Server instance named AppServer02\SQLEXPRESS. The
Add Data Source Wizard errors with the message The file
\\AppServer02\SharedDatabases\textdb.mdf is on a network path that is not
supported for database files.

Will VBExpress allow me to connect to a SQL database that is not local?

thanks for you time.

"Cor Ligthert [MVP]" wrote:
Cleo,

Thanks for your information one other question?

Do you use a proxy or whatever like that?
--------------------------------------------------------------------------
There is not so much text on that page by the way, it is this.

This sample is usable for more than only the Faq, but you can make that
sample yourself.
--------------------------------------------------------------------------------

Open a new project.

Click on Data -Add New DataSource and follow the wizard
Click on Data -Show Datasources
Drag from the at the left opened window your table to the form
Set in Solution Explorer the Show All files Icon to show all files

You have now a lot of samples with a strongly typed dataset

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:6B**********************************@microsof t.com...
I just receive the general error "This Page cannot be displayed." I get
it
when I click on the link and when I google into vb-tips.com. I am
using
Windows XP and Internet Exployer

"Cor Ligthert [MVP]" wrote:

Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microsof t.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide
me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:

Cleo,

The server should be reachable by its Server name. Not as by the
Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microsof t.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I
have
success writing test code on my local machine and am now setting
up
tests
for
deployment to a server. I have installed SQL Express on a
Windows
2003
Server. I can connect and create databases on the Remote Server
from
my
local machine using SQL Management Express, so I know Remote
Access
is
working.

However, I am unable to connect using a connection string within
my
VB
Express program. I am using the SQL Connection String Builder
with
the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database
using a
connection string.

Your help is appreciated





Aug 23 '06 #10

P: n/a
Cor, I tried the link to your site from my home. I was successful.
Thanks for all your help

"Cor Ligthert [MVP]" wrote:
Cleo,

Can you tell me why you cannot access that link?

Because it is the website from Ken and me.

Thanks in advance

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:14**********************************@microsof t.com...
Thanks for the response
I'm sorry but I can't access the link you provided. Can you provide me
with
some additional information or a different link.
"Cor Ligthert [MVP]" wrote:
Cleo,

The server should be reachable by its Server name. Not as by the Jet
engine
(access) with its file address.

It is in fact much easier than with Jet.

Why not try this one first, after doing this you can see almost
everything
that is hapening.
http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

I hope this helps,

Cor

"cleo" <cl**@discussions.microsoft.comschreef in bericht
news:C4**********************************@microsof t.com...
I am migrating from VB6/Access to Visual Basic and SQL Express. I have
success writing test code on my local machine and am now setting up
tests
for
deployment to a server. I have installed SQL Express on a Windows 2003
Server. I can connect and create databases on the Remote Server from
my
local machine using SQL Management Express, so I know Remote Access is
working.

However, I am unable to connect using a connection string within my VB
Express program. I am using the SQL Connection String Builder with the
properties

Dim cn as SQLClient.DBConnectionStringBuilder = new
SQLClient.DBConnectionStringBuilder
cn.DataSource = "AppServer02\SQLExpress"
cn.ApplicationName = "VBTest"
cn.AttachDBFilename = "testdb.mdf"
cn.IntegratedSecurity = True
cn.PersistSecurityInfo = False

The error I receive is
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.

I understand that VB Express does not support Remote Connections
through
the
Designer, but I thought I could connect to a remote database using a
connection string.

Your help is appreciated



Aug 23 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.