Like I said. I used the VS.net to create the connection string and I was
able to view the databases. I also used the test connection, which worked
What I need to know, is what the differences are between, the vs.net env and
asp. I have intergrated security on that server and in the webinfo file,
impersonate is set to false ( I have played with that either way)
Do I need the latest mdac? and why would the console program not work.
John
"dj Bass" <> wrote in message
news:...
> if it's taken from another machine, then the things you need to check out
> are the domains for the database boxes you're trying to access... does the
> network machine exist with the same mappings as on the original PC? if
it's
> a different database instance, then you should probably start the
connection
> from scratch again.
>
> i still say try the design view, you see more happening there in front of
> you without worry about strings of info...
>
> Dan.
>
> "John Giblin" <> wrote in message
> news:...
> > I just forgot that in that try. No affect. Still cannot connect. It
> seems
> > like a configuration on my mchine since it worked for someone else with
> the
> > same code
> >
> > John
> > "Jon Yates" <> wrote in message
> > news:00b401c34baa$90764760$...
> > > Hello mate.
> > >
> > > In your connection string you may need to supply the
> > > Username and Password to the Database. I've pasted in the
> > > connection sring that I use from within a Windows App to
> > > connection to a SQLServer 2000 DB.
> > >
> > > Hope it helps,
> > >
> > > Jon
> > >
> > > "Provider=sqloledb;data source=SUNWL19655\NetSDK;initial
> > > catalog=Portal; user id=sa; password="
> > >
> > > >-----Original Message-----
> > > >I have written both a asp.net and a console program where
> > > I am trying to
> > > >connection to a db.
> > > >
> > > >When I use the sqlconnection using vs.net 2003. I am able
> > > to see the table
> > > >and the test the connection
> > > >
> > > >When I run my program I get an error! ARGh!
> > > >
> > > >In my console program I get:
> > > >Error Request for the permission of type
> > > >System.Data.SqlClient.SqlClientPermission, System.Data,
> > > Version=1.0.5000.0,
> > > >Cul
> > > >ture=neutral, PublicKeyToken=b77a5c561934e089 failed.
> > > >
> > > >In my asp.net i get this:
> > > >Exception Details: System.UnauthorizedAccessException:
> > > Access is denied.
> > > >
> > > >It fails at the open():
> > > >Console program
> > > >
> > > >string strConnect = "workstation id=NYCNJGIBLIN;packet
> > > size=4096;user
> > > >id=jgiblin;data source=ewr1gpdsq" +
> > > >
> > > >"l;persist security info=False"; }
> > > >
> > > >SqlConnection conn = new SqlConnection(strConnect);
> > > >
> > > >SqlCommand cmd = new SqlCommand("Select * from
> > > Content_Master", conn);
> > > >
> > > >// cmd.Connection = new SqlConnection(strConnect);
> > > >
> > > >// cmd.CommandText = "Content_Master_Update";
> > > >
> > > >cmd.CommandType = CommandType.Text;
> > > >
> > > >test = "Step 2";
> > > >
> > > >test = "Step 3";
> > > >
> > > >conn.Open();
> > > >
> > > >
> > > >
> > > >
> > > >.
> > > >
> >
> >
>
>
|