Re: Dataset - Error

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Daniel Joskovski (omnis_at_NOSPAMunetREMOVECAPS.com.mk)
Date: 06/09/04


Date: Thu, 10 Jun 2004 00:12:54 +0200

Ok.
Analyzing your connection string, I realize that you try to connect to SQL
server which is on another machine then yours
(your WS is CHAKP, and data source is SEAFS that mean to me that machine on
which sql-server is running have name SEAFS) to achieve trusted connection
and use integrated security, your two machines must be in the same domain,
or your workstation and your server must run under win2000 server, so if it
is not the case I recommend you to use mixed mode security (SQL and Windows)
and put Username and Password in connection string. In case that you can
afford trusted connection still you must impersonate your identity when
accessing SQL server.
Regards,
Daniel
"Papri Chakravorty" <anonymous@discussions.microsoft.com> wrote in message
news:C11FEF15-450C-42A0-B88D-C8184E3EF908@microsoft.com...
> Hello Experts,
>
> Yesterday I was trying to just populate a datagrid with a dataset.
> I used the following code in the page load event after using connection,
adapter and data set
> in the design mode
>
> Dim nC As SqlConnection = New SqlConnection("data source=SEAFS;initial
catalog=Northwind;integrated security=SSPI;persist security
info=False;workstation id=CHAKP;packet size=4096")
> Dim selectCMD As SqlCommand = New SqlCommand("SELECT CustomerID,
CompanyName FROM Customers", nC)
> selectCMD.CommandTimeout = 30
> Dim DA As SqlDataAdapter = New SqlDataAdapter()
> DA.SelectCommand = selectCMD
>
> nC.Open()
>
> Dim DS As DataSet = New DataSet()
> DA.Fill(DS, "Products")
>
> nC.Close()
>
> .When i tried to build and browse,
> it gave me the following error
>
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection
>
> Can you please let me know what is causing this?
>
> I cannot proceed with the following chapters unless I get this clear.
>
> Many thanks
> Papri Chakravorty



Relevant Pages

  • Re: Connection issues between .Net framwok and SQl Express 2005
    ... You will no longer need the database MDF file name in the connection string. ... simply attach the ASPNETDB.mdf to SQL Server permenantly, ... as USER INSTANCE on existing SQL Server Express, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Performance of ODBC
    ... if you have a software firewall; forward 1433/1434 to your server ... I've now created my own server with SQL Server 2005 Express, ... glitch concerns the Upsizing Wizard. ... I originally set up my ODBC connection via ...
    (microsoft.public.access.adp.sqlserver)
  • SQL 2005 Express and VS .Net 2003 wizard error More options
    ... Open the server explorer panel ... Go to the Provider tab and select SQL NAtive Client (DON'T use oledb ... Go back to the Connection tab and carry on setting up the connection ... I have installed Visual Studio 2005 Professional and then Visual Studio ...
    (microsoft.public.sqlserver)
  • Re: Timeout problem with SS2K, VS03
    ... I noticed calls in sql profiler: ... This is the server side debug stored procedure. ... a timeout issue that I cannot identify the source of. ... transaction is committed and the connection is closed cleanly and all ...
    (microsoft.public.dotnet.framework.adonet)
  • Complicated Connection Problems bewteen ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.access.adp.sqlserver)