. Net ACCESS database usage Problems

Source: Internet
Author: User

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:
<Add key = "SQLConnString" value = "provider = microsoft. jet. oledb.4.0; data source ="/>
<Add key = "dbPath" value = "~ /App_Data/# ¥ % ¥ # %. config "/>

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.