Error reading from Access

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Error reading from Access

    In a web anabled program we want to read some info of a user. Therefore we
    wrote

    Private Sub ReadUser(ByVal Username As String)
    'Step by step
    '1 De connector = MyConn
    '2 Make a SQL String (= SqlString)
    '3 Make a OleDbCommand ( cmdUsers = New OleDBCommand( SqlString,
    MyConn)
    '4 Add a Parameter
    '5 Make a OleDbDataAdator ( daUsers = New
    OleDbDataAdaptor(cmdSelect)
    '6 Make a DataSet ( dsUsers as New Dataset)
    '7 Get Data ( daUsers.Filll(dsUsers,"Users")
    '9 Use Results
    '(==================)
    '
    'There we go
    '1 existing connection
    '2 Contruct a SqlString
    Dim SqlString As String = ("SELECT ID, Naam, Usernaam, Userlevel
    FROM Users Where ([Naam]= ?)")
    '3 Make OleDbCOmmand
    Dim cmdUsers As New System.Data.OleDb.OleDbCommand(SqlString,
    MyConn)
    '4 Setup Parameter
    cmdUsers.Parameters.Add(New System.Data.OleDb.OleDbParameter("Naam",
    System.Data.OleDb.OleDbType.VarWChar, 50, "Naam")).Value = Username
    '5 Make OledBDataAdaptor
    Dim daUsers As New System.Data.OleDb.OleDbDataAdapter(cmdUsers)
    '6 Create a new dataset
    Dim dsUsers As New DataSet
    '7 Get Data from database
    daUsers.Fill(dsUsers, "Users")
    'Gives a Error : No value given for one or more required parameters.

    Etc........
    end Sub

    Thus someone kowns wat's wrong here. After spending 6 hours with the help
    file an a stack of book we have'd a cloe yet.


    Alexander M. Polak Guest

  2. Similar Questions and Discussions

    1. reading from access
      i am using sams teach yourself cold fusion. and data source can not be found comes up when trying to read data file.
    2. Error reading from Access Database
      Hi Folks Actually I am new to ASP, I will be thankful so much if anyone could help I have an Access2000 Database, I have Listing.html that has...
    3. Reading an MS Access Database file on *NIX platform using PHP
      I'm building a small web application for a friend using PHP. He'd like to use MS Access to keep the data in, and update the data on the site by...
    4. [PHP] Reading an MS Access Database file on *NIX platform using PHP
      On Sun, 24 Aug 2003 14:54:41 -0400 (EDT), you wrote: Suggestion: go backwards. Set up the data in, say, MySQL with an ODBC driver, and use...
    5. [PHP] Reading an MS Access Database file on *NIX platformusing PHP
      At 03:18 25.08.2003, Weston Cann said: ---------------------------------------- ---------------------------------------- You could do that...
  3. #2

    Default Re: Error reading from Access

    Hmm, this looks like dotnet code. You'll probably have better luck getting
    an answer on one of the dotnet groups, like
    microsoft.public.dotnet.framework.aspnet.


    Alexander M. Polak wrote:
    > In a web anabled program we want to read some info of a user.
    > Therefore we wrote
    >
    > Private Sub ReadUser(ByVal Username As String)
    > 'Step by step
    > '1 De connector = MyConn
    > '2 Make a SQL String (= SqlString)
    > '3 Make a OleDbCommand ( cmdUsers = New OleDBCommand(
    > SqlString, MyConn)
    > '4 Add a Parameter
    > '5 Make a OleDbDataAdator ( daUsers = New
    > OleDbDataAdaptor(cmdSelect)
    > '6 Make a DataSet ( dsUsers as New Dataset)

    Bob Barrows Guest

  4. #3

    Default Re: Error reading from Access

    Will try that, thanks

    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:%23fZPLijZDHA.1384@TK2MSFTNGP10.phx.gbl...
    > Hmm, this looks like dotnet code. You'll probably have better luck getting
    > an answer on one of the dotnet groups, like
    > microsoft.public.dotnet.framework.aspnet.
    >
    >
    > Alexander M. Polak wrote:
    > > In a web anabled program we want to read some info of a user.
    > > Therefore we wrote
    > >
    > > Private Sub ReadUser(ByVal Username As String)
    > > 'Step by step
    > > '1 De connector = MyConn
    > > '2 Make a SQL String (= SqlString)
    > > '3 Make a OleDbCommand ( cmdUsers = New OleDBCommand(
    > > SqlString, MyConn)
    > > '4 Add a Parameter
    > > '5 Make a OleDbDataAdator ( daUsers = New
    > > OleDbDataAdaptor(cmdSelect)
    > > '6 Make a DataSet ( dsUsers as New Dataset)
    >
    >

    Alexander M. Polak Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139