Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 6th, 2004, 04:18 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to marsali
Default error in dataset

hi
im new in .net and got an error in my first database access page. as follows

<%@ import namespace="system.data" %>
<%@ import namespace="system.data.oledb" %>
<script language="VB" runat="server" debug="true">
    Sub page_load(sender as object, e as eventargs)
        dim objconnection as oledbconnection
        dim objcommand as oledbdataadapter
        dim strconnect as string
        dim strcommand as string
        dim Dataset1 as dataset

        strconnect = "provider=microsoft.jet.oleb.4.0,"
        strconnect + = "datasource=c:\inetpub\wwwroot\test\test.mdb,"
        strconnect + = "persist security info=false"

        strcommand = "select * from userinfo"

        objconnection = new oledbconnection(strconnect)
        objcommand = new oledbdataadapter(strcommand, objconnection)
        objcommand.fill(dataset1, "userinfo")

        datagrid1.datasource = dataset1.tables("userinfo").defaultview
        datagrid1.databind()

    end sub
</script>
<html>
    <head>
        <title>Data Grid Control Example</title>
    </head>
    <body>
        <asp:datagrid id="datagrid1" runat="server" />
    </body>
</html>

it is giving error "null value not allowed in data set."
i think the problem is in the fill dataset

plz if somebody tell me the solutoin






Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Error in foreach loop for DataSet bravipandey ADO.NET 2 September 28th, 2005 06:43 PM
WebMethod Error when return type is a dataset Hagop .NET Web Services 2 August 18th, 2005 09:13 AM
Webmethod error while return type is a dataset Hagop General .NET 1 August 10th, 2005 05:46 AM
error on Webmethod when return type is a dataset Hagop General .NET 1 August 10th, 2005 05:45 AM
Cant fill datagrid with dataset (databinding error Tsjelle Pro VB.NET 2002/2003 1 April 5th, 2004 12:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.