Jump to content

asp.net database file types


richinslc

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 comment
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 comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...