Jump to content

asp.net database file types

Recommended Posts

I am a little hesitant to post here, but I belive someone here will easily know the answer to this. I am not a programmer but I am trying to educate myself so that I can spec something properly.There is an example on the W3 site in the asp.net section under the heading asp.net / asp.net examples / Database connection - Bind to a DataList control.This is the code:<%@ Import Namespace="System.Data.OleDb" %><script runat="server">sub Page_Loaddim dbconn,sql,dbcomm,dbreaddbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath("/db/northwind.mdb"))dbconn.Open()sql="SELECT * FROM customers"dbcomm=New OleDbCommand(sql,dbconn)dbread=dbcomm.ExecuteReader()customers.DataSource=dbreadcustomers.DataBind()dbread.Close()dbconn.Close()end sub</script><html><body><form runat="server"><asp:DataListid="customers"runat="server"cellpadding="2"cellspacing="2"borderstyle="inset"backcolor="#e8e8e8"width="100%"headerstyle-font-name="Verdana"headerstyle-font-size="12pt"headerstyle-horizontalalign="center"headerstyle-font-bold="True"itemstyle-backcolor="#778899"itemstyle-forecolor="#ffffff"footerstyle-font-size="9pt"footerstyle-font-italic="True"><HeaderTemplate>Customers Table</HeaderTemplate><ItemTemplate><%#Container.DataItem("companyname")%> in<%#Container.DataItem("address")%>, <%#Container.DataItem("city")%></ItemTemplate><FooterTemplate>Source: Northwind Database</FooterTemplate></asp:DataList></form></body></html>This statement from the example above identifies the database file.dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath("/db/northwind.mdb") My question is this - What database file types can be used. In particular, can the old dbase file type - .dbf - be used as the database file?I don't know if this is appropriate here, but I also would like to find someone I could pay to program a fairly simple website using asp.net for our industrial electrical products company. Any suggestions will be appreciated - thanks.

Link to post
Share on other sites
  • 4 weeks later...

*.dbf extension is DBase type database. The provider for this type of database is Microsoft.Jet.OleDb.4.0 (Microsoft Jet OLEDB Provider). Meaning that it can make database connection to the DBase file.You also have second choice. You may use Access 2007 application to convert from DBase to Microsoft Access Database. Make sure to create a backup copy of the original DBase file before making any conversion.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...