I have been using sqlserver and other databases. I did not expect a small program that requires access to the database. I am very depressed:
First, the database connection string:
<Deleetask>
<Add key = "SQLConnString" value = "provider = microsoft. jet. oledb.4.0; data source ="/>
<Add key = "dbPath" value = "~ /App_Data/# ¥ % ¥ # %. config "/>
</AppSettings>
In the database connection class:
Public static readonly string CONN_STRING_NON_DTC = System. configuration. configurationManager. appSettings ["SQLConnString"]. toString () + System. web. httpContext. current. server. mapPath (ConfigurationManager. appSettings ["dbPath"]) + "; Jet OLEDB: Database Password =$ $ g % s @@@;";
In the access database, table Union queries cannot have the same field name. If the number column names of both tables are IDs, the Union query will report an error: ds. Fill () at least one parameter is not specified.
An access database order by column with duplicate values will invalidate the top
You cannot change it to the following method:
Select top 5 ID, newsTitle from (select top 5 ID, newsTitle from news where newsClassID = 1 order by isTop desc)