Hi all,
1st post here so................:-)
I am using VS.Net and coding in VB. I am following some examples from a book
that shows a connection string as:-
sqlcnn = new sqlconnection("data source=(local);initial
catalog=Northwind;integrated security=SSPI")
My server is the VS.Net default, ie. \\computername\NetSDK, therefore the
above in my code becomes:-
sqlcnn = new sqlconnection("data source=MyComputer\NetSDK;initial
catalog=Northwind;integrated security=SSPI")
I have used this in two different examples. On one it appears to work
sporadically and on the most recent I am receiving an 'Access is Denied'
runtime error and the handler refers to an UnauthorisedAccessException at
the point in code that refers to the Class where the connection is being
made. Therefore I am assuming that it is a problem with connecting to the
sql database......but not sure how to be certain or what the problem might
be. The dB is located properly and uses the default Windows Authentication.
It is not as simple to step through this as the 'example' is a client/host
example with Object Pooling.
Any thoughts?????
Cheers,
Phil 7 1225
Phil,
Wit SQL is the datasource the SQL servername, not the path as you probably
expect from ms-access.
When you use MSDE local as test, than that local is already OK or you can
replace it for the servername.
I hope this helps?
Cor
"Phil" <Ph**@nospam.com> schreef in bericht
news:cp**********@hercules.btinternet.com... Hi all,
1st post here so................:-)
I am using VS.Net and coding in VB. I am following some examples from a book that shows a connection string as:-
sqlcnn = new sqlconnection("data source=(local);initial catalog=Northwind;integrated security=SSPI")
My server is the VS.Net default, ie. \\computername\NetSDK, therefore the above in my code becomes:-
sqlcnn = new sqlconnection("data source=MyComputer\NetSDK;initial catalog=Northwind;integrated security=SSPI")
I have used this in two different examples. On one it appears to work sporadically and on the most recent I am receiving an 'Access is Denied' runtime error and the handler refers to an UnauthorisedAccessException at the point in code that refers to the Class where the connection is being made. Therefore I am assuming that it is a problem with connecting to the sql database......but not sure how to be certain or what the problem might be. The dB is located properly and uses the default Windows Authentication.
It is not as simple to step through this as the 'example' is a client/host example with Object Pooling.
Any thoughts?????
Cheers,
Phil
Sorry Cor,
Not sure whether I understood exactly what you were trying to explain but
maybe I got the gist....................however, for whatever reason (and I
don't know why!), my coded connections do not 'like' the (local)
reference....it does not work on my machine...in fact, I have tried on both
my laptop and desktop with the same response. Have you any other
suggestion(s)?
Cheers,
Phil
"Cor Ligthert" <no************@planet.nl> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl... Phil,
Wit SQL is the datasource the SQL servername, not the path as you probably expect from ms-access.
When you use MSDE local as test, than that local is already OK or you can replace it for the servername.
I hope this helps?
Cor
"Phil" <Ph**@nospam.com> schreef in bericht news:cp**********@hercules.btinternet.com... Hi all,
1st post here so................:-)
I am using VS.Net and coding in VB. I am following some examples from a book that shows a connection string as:-
sqlcnn = new sqlconnection("data source=(local);initial catalog=Northwind;integrated security=SSPI")
My server is the VS.Net default, ie. \\computername\NetSDK, therefore
the above in my code becomes:-
sqlcnn = new sqlconnection("data source=MyComputer\NetSDK;initial catalog=Northwind;integrated security=SSPI")
I have used this in two different examples. On one it appears to work sporadically and on the most recent I am receiving an 'Access is Denied' runtime error and the handler refers to an UnauthorisedAccessException
at the point in code that refers to the Class where the connection is being made. Therefore I am assuming that it is a problem with connecting to
the sql database......but not sure how to be certain or what the problem
might be. The dB is located properly and uses the default Windows Authentication.
It is not as simple to step through this as the 'example' is a
client/host example with Object Pooling.
Any thoughts?????
Cheers,
Phil
Hi,
data source is the name or IP address of your computer,
not a path to a directory.
--
HTH
Dan Artuso, Access MVP
"Phil" <Ph**@nospam.com> wrote in message news:cp**********@hercules.btinternet.com... Hi all,
1st post here so................:-)
I am using VS.Net and coding in VB. I am following some examples from a book that shows a connection string as:-
sqlcnn = new sqlconnection("data source=(local);initial catalog=Northwind;integrated security=SSPI")
My server is the VS.Net default, ie. \\computername\NetSDK, therefore the above in my code becomes:-
sqlcnn = new sqlconnection("data source=MyComputer\NetSDK;initial catalog=Northwind;integrated security=SSPI")
I have used this in two different examples. On one it appears to work sporadically and on the most recent I am receiving an 'Access is Denied' runtime error and the handler refers to an UnauthorisedAccessException at the point in code that refers to the Class where the connection is being made. Therefore I am assuming that it is a problem with connecting to the sql database......but not sure how to be certain or what the problem might be. The dB is located properly and uses the default Windows Authentication.
It is not as simple to step through this as the 'example' is a client/host example with Object Pooling.
Any thoughts?????
Cheers,
Phil
Phil,
Where is the database located?
Cor
"Phil" <Ph**@nospam.com> Not sure whether I understood exactly what you were trying to explain but maybe I got the gist....................however, for whatever reason (and I don't know why!), my coded connections do not 'like' the (local) reference....it does not work on my machine...in fact, I have tried on both my laptop and desktop with the same response. Have you any other suggestion(s)?
Cheers,
Phil
"Cor Ligthert" <no************@planet.nl> wrote in message news:OZ**************@TK2MSFTNGP09.phx.gbl... Phil,
Wit SQL is the datasource the SQL servername, not the path as you probably expect from ms-access.
When you use MSDE local as test, than that local is already OK or you can replace it for the servername.
I hope this helps?
Cor
"Phil" <Ph**@nospam.com> schreef in bericht news:cp**********@hercules.btinternet.com... > Hi all, > > 1st post here so................:-) > > I am using VS.Net and coding in VB. I am following some examples from a > book > that shows a connection string as:- > > sqlcnn = new sqlconnection("data source=(local);initial > catalog=Northwind;integrated security=SSPI") > > My server is the VS.Net default, ie. \\computername\NetSDK, therefore the > above in my code becomes:- > > sqlcnn = new sqlconnection("data source=MyComputer\NetSDK;initial > catalog=Northwind;integrated security=SSPI") > > I have used this in two different examples. On one it appears to work > sporadically and on the most recent I am receiving an 'Access is > Denied' > runtime error and the handler refers to an UnauthorisedAccessException at > the point in code that refers to the Class where the connection is > being > made. Therefore I am assuming that it is a problem with connecting to the > sql database......but not sure how to be certain or what the problem might > be. The dB is located properly and uses the default Windows > Authentication. > > It is not as simple to step through this as the 'example' is a client/host > example with Object Pooling. > > Any thoughts????? > > Cheers, > > Phil > >
Probably not related to your access denied problem, but have you tried
(local)\NetSDK instead of simply (local) since you want to access a specific
sql server instance?
Greg
"Phil" <Ph**@nospam.com> wrote in message
news:cp**********@titan.btinternet.com... Sorry Cor,
Not sure whether I understood exactly what you were trying to explain but maybe I got the gist....................however, for whatever reason (and I don't know why!), my coded connections do not 'like' the (local) reference....it does not work on my machine...in fact, I have tried on both my laptop and desktop with the same response. Have you any other suggestion(s)?
Cheers,
Phil
"Cor Ligthert" <no************@planet.nl> wrote in message news:OZ**************@TK2MSFTNGP09.phx.gbl... Phil,
Wit SQL is the datasource the SQL servername, not the path as you probably expect from ms-access.
When you use MSDE local as test, than that local is already OK or you can replace it for the servername.
I hope this helps?
Cor
"Phil" <Ph**@nospam.com> schreef in bericht news:cp**********@hercules.btinternet.com... > Hi all, > > 1st post here so................:-) > > I am using VS.Net and coding in VB. I am following some examples from a > book > that shows a connection string as:- > > sqlcnn = new sqlconnection("data source=(local);initial > catalog=Northwind;integrated security=SSPI") > > My server is the VS.Net default, ie. \\computername\NetSDK, therefore the > above in my code becomes:- > > sqlcnn = new sqlconnection("data source=MyComputer\NetSDK;initial > catalog=Northwind;integrated security=SSPI") > > I have used this in two different examples. On one it appears to work > sporadically and on the most recent I am receiving an 'Access is > Denied' > runtime error and the handler refers to an UnauthorisedAccessException at > the point in code that refers to the Class where the connection is > being > made. Therefore I am assuming that it is a problem with connecting to the > sql database......but not sure how to be certain or what the problem might > be. The dB is located properly and uses the default Windows > Authentication. > > It is not as simple to step through this as the 'example' is a client/host > example with Object Pooling. > > Any thoughts????? > > Cheers, > > Phil > >
Sorry guys,
I could have perhaps given more info:-
I am running a single PC with MSDE on XP. The 'example' I am trying to work
through is creating a serviced component with object pooling. This perhaps
sounds more extravagant than the fairly simple code. The serviced component
has a default constructor that 'should' create a connection to the Northwind
Db. It also has a couple of methods that return dataset results based on a
passed SQL query from the calling app.
The SQL Service Server Manager shows:- Running - \\PHILSPC\NetSDK - MSSQL
Server
The calling app. instantiates the Serviced Component with:-
nsc = New NorthwindSC
This is the line in code that returns the Access is Denied!
Hope this helps you to help me :-). Thanks for the input so far....please
ask further questions!
Phil
"Cor Ligthert" <no************@planet.nl> wrote in message
news:eI*************@TK2MSFTNGP09.phx.gbl... Phil,
Where is the database located?
Cor
"Phil" <Ph**@nospam.com>
Not sure whether I understood exactly what you were trying to explain
but maybe I got the gist....................however, for whatever reason
(and I don't know why!), my coded connections do not 'like' the (local) reference....it does not work on my machine...in fact, I have tried on both my laptop and desktop with the same response. Have you any other suggestion(s)?
Cheers,
Phil
"Cor Ligthert" <no************@planet.nl> wrote in message news:OZ**************@TK2MSFTNGP09.phx.gbl... Phil,
Wit SQL is the datasource the SQL servername, not the path as you probably expect from ms-access.
When you use MSDE local as test, than that local is already OK or you
can replace it for the servername.
I hope this helps?
Cor
"Phil" <Ph**@nospam.com> schreef in bericht news:cp**********@hercules.btinternet.com... > Hi all, > > 1st post here so................:-) > > I am using VS.Net and coding in VB. I am following some examples from
a > book > that shows a connection string as:- > > sqlcnn = new sqlconnection("data source=(local);initial > catalog=Northwind;integrated security=SSPI") > > My server is the VS.Net default, ie. \\computername\NetSDK, therefore the > above in my code becomes:- > > sqlcnn = new sqlconnection("data source=MyComputer\NetSDK;initial > catalog=Northwind;integrated security=SSPI") > > I have used this in two different examples. On one it appears to work > sporadically and on the most recent I am receiving an 'Access is > Denied' > runtime error and the handler refers to an
UnauthorisedAccessException at > the point in code that refers to the Class where the connection is > being > made. Therefore I am assuming that it is a problem with connecting to the > sql database......but not sure how to be certain or what the problem might > be. The dB is located properly and uses the default Windows > Authentication. > > It is not as simple to step through this as the 'example' is a client/host > example with Object Pooling. > > Any thoughts????? > > Cheers, > > Phil > >
Phil,
Why not make a test solution,
Just drag a SQLconnection to your screen.
Than go to the properties of that and start the wizard.
Take than only a look at the created datasource, and forget the rest.
That is what I would do in your situation.
I hope this helps,
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nick Gilbert |
last post by:
Hi,
I have an asp.net application which runs from a CD-ROM using Cassini. As
such, it is single user only.
The application connects to an Access database when it is loaded, and
keeps the same...
|
by: Jay King |
last post by:
Ok I'm very new to the whole database thing, my problem is I'd like to
use firebirds embeded database engine so I can just send it as some
stand alone dlls to my user with my main program. I have...
|
by: mjf |
last post by:
Hello,
We made a backup image file for a database on one machine (A), and
we restored the database on another machine (B), using the backup image
file. Everything went fine. But when we try to...
|
by: Martin B |
last post by:
Hallo!
I'm working with C# .NET 2.0, implementing Client/Server Applications which
are connecting via Network to SQL-Server or Oracle Databases.
To stay independent from the underlaying Database...
|
by: jason |
last post by:
I've been playing around with new (for 2.0) membershp functionality.
I was able to build a simple login form that secures a directory on a
project I built locally on my development desktop.
...
|
by: surfrat_ |
last post by:
Hi,
I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb
database. Please help me to sort this out.
Problem 1:
The Microsoft...
|
by: rich |
last post by:
I have a PHP5 application that accepts external messages, and inserts
them into a database. It's rather high traffic.. the server could be
receiving thousands at a time, and recently mysql has...
|
by: alex |
last post by:
I've converted a latin1 database I have to utf8. The process has been:
# mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore
--skip-set-charset mydb mydb.sql
# iconv -f...
|
by: Gordon |
last post by:
I want to add a feature to a project I'm working on where i have
multiple users set up on my Postgres database with varying levels of
access. At the bare minimum there will be a login user who...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |