Dataset - Error

From: Papri Chakravorty (anonymous_at_discussions.microsoft.com)
Date: 06/09/04

  • Next message: Disillusioned_01: "Re: Java vs dotnet job market"
    Date: Tue, 8 Jun 2004 18:06:01 -0700
    
    

    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


  • Next message: Disillusioned_01: "Re: Java vs dotnet job market"

    Relevant Pages

    • Re: DataGrid EditItemCommand : must click twice to make DataGrid Editable
      ... You need to drag the dataset and connection and adapter on ... Page One - datagrid dissapears when I click edit ... You gotta drag those babies to the page! ...
      (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
    • Re: Data Grid
      ... The Datagrid take the connection from sqlConnection1 with data ... > adapter and dataset. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: ipconfig and network connections empty - Device Manager okay
      ... adapter when the problem occurred. ... degree that in KB825826 the network connections _are_ working and just ... local area connection in the Network and Dial-up Connections folder. ... Trying to install a connection gets one to a screen where one can ...
      (microsoft.public.windowsxp.network_web)
    • Re: ipconfig and network connections empty - Device Manager okay
      ... adapter when the problem occurred. ... degree that in KB825826 the network connections _are_ working and just ... local area connection in the Network and Dial-up Connections folder. ... Trying to install a connection gets one to a screen where one can ...
      (microsoft.public.windowsxp.network_web)
    • Re: Network Adapter not connected, says Network Wizard, but...
      ... Ethernet Adapter, ... Network Adapter to work, but I really need a schematic circuit diagram as ... The laptop is connected to the internet via a dial-up connection, ...
      (microsoft.public.windowsxp.network_web)