Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > database connection

Reply
Thread Tools

database connection

 
 
wei
Guest
Posts: n/a
 
      04-07-2004
Thanks Craig. i think you are right.the connectString is not set properly.
if i down the ip address, how do i set it?
string connectionString = "Provider=MSDAORA.1;Data source=server;User
ID=username;Password=password";

this is my current setting. i try to replace server with ip+port, it didn't
work either. how do i set it? thanks.



"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:(E-Mail Removed)...
> wei wrote:
>
> >
> > ORA-12154: TNS:could not resolve service name
> > Description: An unhandled exception occurred during the execution of the
> > current web request. Please review the stack trace for more information
> > about the error and where it originated in the code.
> >
> > Exception Details: System.Data.OleDb.OleDbException: ORA-12154:

TNS:could
> > not resolve service name
> >

>
> looks like something in your connectString is not correct. It should
> not have to be different for web vs win. I'd check to make sure your
> web app is setup correctly for database access. Also check the tns
> settings for your oracle connection on that box.
>
> Actually, maybe it's because of permissions, you can't read the file
> where the tns values are stored. If this is a dev box, try temporarily
> changing your user setup in machine.config to SYSTEM instead of machine
> (it's in the processModel node/section). Then re-run this. See if it
> works. (and then of course, as a good developer, change machine.config
> back )
>
> If it fails (which I would hope), then you know it's something with
> permissions for the aspnet account accessing some Oracle settings/files.
> Maybe have to give the aspnet user access to that directory. I
> haven't worked with Oracle in awhile, so I'm drawing from vague

memories...
>
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET




 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\) [MVP]
Guest
Posts: n/a
 
      04-08-2004
You do not have a TNS name for the server. With Oracle, you have to have the
Oracle client blah blah on your web machine to connect to Oracle. One of the
items is TNSNames.ora (? - may have spelling wrong). For the server in
question, you have to have a TNS name to use the oracleClient objects.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"wei" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Craig. i think you are right.the connectString is not set properly.
> if i down the ip address, how do i set it?
> string connectionString = "Provider=MSDAORA.1;Data source=server;User
> ID=username;Password=password";
>
> this is my current setting. i try to replace server with ip+port, it

didn't
> work either. how do i set it? thanks.
>
>
>
> "Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
> news:(E-Mail Removed)...
> > wei wrote:
> >
> > >
> > > ORA-12154: TNS:could not resolve service name
> > > Description: An unhandled exception occurred during the execution of

the
> > > current web request. Please review the stack trace for more

information
> > > about the error and where it originated in the code.
> > >
> > > Exception Details: System.Data.OleDb.OleDbException: ORA-12154:

> TNS:could
> > > not resolve service name
> > >

> >
> > looks like something in your connectString is not correct. It should
> > not have to be different for web vs win. I'd check to make sure your
> > web app is setup correctly for database access. Also check the tns
> > settings for your oracle connection on that box.
> >
> > Actually, maybe it's because of permissions, you can't read the file
> > where the tns values are stored. If this is a dev box, try temporarily
> > changing your user setup in machine.config to SYSTEM instead of machine
> > (it's in the processModel node/section). Then re-run this. See if it
> > works. (and then of course, as a good developer, change machine.config
> > back )
> >
> > If it fails (which I would hope), then you know it's something with
> > permissions for the aspnet account accessing some Oracle settings/files.
> > Maybe have to give the aspnet user access to that directory. I
> > haven't worked with Oracle in awhile, so I'm drawing from vague

> memories...
> >
> > --
> > Craig Deelsnyder
> > Microsoft MVP - ASP/ASP.NET

>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Database Connection - Not Associated With Trusted Connection Mythran ASP .Net 5 10-05-2005 10:50 PM
Re: Software Developer to transcribe Oracle database into Access database Fluker MCSD 0 07-09-2003 01:20 PM
Re: Software Developer to transcribe Oracle database into Access database Guy Cox MCSD 1 07-09-2003 08:07 AM



Advertisments