Hi mark

Thanks for helping me with this problem i have now sorted out and figured out what the 
problem was it was because for some reasom some of the .net files had been delleted or 
was not working so i just downloaded the dot net framework and it works a treat !!!

I knew the coding looked right 

Thanks

Rich
  ----- Original Message ----- 
  From: Mark E 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, April 29, 2004 3:54 PM
  Subject: Re: [AspClassicAnyQuestionIsOk] connecting to acccess form asp.net


  Rich,

  I don't know why you are not getting any errors.  But I used this code to 
successfully return records from an Access 2000 database on my local pc (Windows 2000 
Pro, IIS 5):

  <[EMAIL PROTECTED] Explicit="True" Language="VB" Debug="True" %>
  <%@ Import namespace="System.Data" %>
  <%@ Import namespace="System.Data.OleDb" %>
  <%@ Import namespace="System.Data.SqlClient" %>
  <script language="VB" runat="server">
  Sub Page_Load(Source As Object, E As EventArgs)

  Dim conAuthors as OleDbConnection
  Dim cmdSelectAuthors as OleDbCommand
  Dim dtrAuthors as OleDbDataReader

  conAuthors = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data 
Source=C:\Inetpub\BegASP\north.mdb;User Id=admin;Password=;")
  conAuthors.Open

  cmdSelectAuthors = New OleDbCommand("SELECT SupplierID, CompanyName From Suppliers", 
conAuthors)

  dgsuppliers.DataSource = cmdSelectAuthors.ExecuteReader()
  dgsuppliers.DataBind()
  End Sub
  </script>
  <html>
  <head>
  <title>Connecting To an Access Database</title>
  </head>
  <body>
  <form runat="server" ID="Form1">
  <H3>Conecting To an Access Database</H3>
  <asp:DataGrid ID="dgsuppliers" Runat="server"></asp:DataGrid>
  </form>
  </body>
  </html>

  Mark

  richard pauer <[EMAIL PROTECTED]> wrote:
  hi there

  I asked this question a coupe opf days ago and only got 1 reply what is wrong with 
this coding

  <[EMAIL PROTECTED] Explicit="True" Language="VB" Debug="True" %>

  <%@ Import namespace="System.Data" %>

  <%@ Import namespace="System.Data.OleDb" %>

  <html>

  <head>

  <title>Connecting To an Access Database</title>

  </head>

  <body>

  <form runat="server">

  <H3>Conecting To an Access Database</H3>

  <asp:DataGrid id = "dgsuppliers" runat="server" />

  </body>

  </html>

  <script language="VB" runat="server">

  Sub Page_Load(Source As Object, E As EventArgs)

  Dim strConnection As String = "Provider=Microsoft.Jet.OleDb.4.0;" & _

  "datasource=C:\Inetpub\begasp\north.mdb;"


  Dim objConnection As New OleDbConnection(strConnection)

  Dim strSQL As String = "SELECT SupplierID, CompanyName From Suppliers"

  Dim objCommand As New OleDbCommand(strSQL, objConnection)

  objConnection.Open()

  dgsuppliers.DataSource = objCommand.ExecuteReader()

  dgsuppliers.DataBind()

  objConnection.Close()

  End Sub

  </script>

  I am getting nothing from this at all 

  i have installed IIS Version 5.1.,  net.framework 1.1, windows XP and access 2000 
IIS is working fine and i am getting no errors from this.

  All necessary files are inm beg asp folder which is shared on network and cna write 
and read scripts amdo think has got all the the required permissions set up okay. i 
also have in the same directory a web.config file aswell.

  Why am i getting no errors and nothing returned for some reason i think the cde just 
stops when i code the datagrid section but don't know why

  Please let me know thanks in advance



  Rich 


  [Non-text portions of this message have been removed]



  ---------------------------------
  Yahoo! Groups Links

     To visit your group on the web, go to:
  http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
    
     To unsubscribe from this group, send an email to:
  [EMAIL PROTECTED]
    
     Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


              
  ---------------------------------
  Do you Yahoo!?
  Win a $20,000 Career Makeover at Yahoo! HotJobs 

  [Non-text portions of this message have been removed]



------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
      
    b.. To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/saFolB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to