Access Database Homepage

Type keyword or phrase to search:

 

 

 


Access Database Homepage

The know how and power behind access database

Want to teach yourself Access? Free online guide at About Access Databases
 
Create Access Database Part 6
Create a report with calculated controls subtotals and grand total based off of a query.

What is the syntax for having a c# document in visual studio to get it to connect with a access database?

Question: What is the syntax for having a c# document in visual studio to get it to connect with a access database?

(Posted by: Tyler on 2010-06-02 07:10:53)

Trying to get my Visual studio document to update an access database when I type my name into the text box field. I am having difficulty getting what I enter into the database. If anyone can assist that would be great.


Answers:

Posted by: LoverOfWine on 2010-06-02, 08:12:49

You should start using LINQ rather than the old techniques. LINQ is far superior and provides a lot more flexibility. You can see guides on using it: msdn.microsoft.com/ en-us/ library/ bb397926.aspx msdn.microsoft.com/ en-us/ library/ bb397980.aspx

  

Posted by: Billion Dollar Boy on 2010-06-02, 07:24:11

I do a lot of coding in VB.net. Although it may be slightly different, VB and C# are very similar. In VB.net, you need to create a connection string to the Access database, and that would change depending on whether it was a .mdb, .accdb, or adp version of MS Access. If you are using MS Access 2007, which is .accdb format, this would be the VB.net connection and sql command sample: Dim Fullpath As String = "C:\path_to_your_access_database\ " Dim DatabasePath As String = Fullpath & "nameOfYourDatabase.accdb " Dim cn As New OleDbConnection( "Provider= Microsoft.ACE.OLEDB.12.0;Data Source= " & DatabasePath) Dim StrFill As String = "INSERT INTO YourTableName (fieldname1) VALUES (' " & textbox1.text & "') " cn.Open() cmd = New OleDbCommand(StrFill, cn) sqlcount = cmd.ExecuteNonQuery cn.Close()

  

Posted by: l_town_51 on 2010-06-02, 09:56:19

Http:/ / csharphelp.com/ 2006/ 01/ ms-access-application-with-c/ c-sharpcorner.com/ UploadFile/ mimrantaj/ Database102102008130743PM/ Database1.aspx

  

Powered by Yahoo! Answers (R)


Back to Previous page

Google News will be listed here
Go Articles will be listed here

Bookmark Access Database Homepage


Want to teach yourself Access? Free online guide at About Access Databases

 

 
Sitemap | Terms of Use | Privacy Policy | Contact

© copyright 2010 Access Database.com, All Rights Reserved.

Legal Notice: This website is powered by Amazon®, Adsense, Clickbank®, Yahoo!® Answers and Youtube. All trademarks are copyrighted by their respective owners. Please read our terms of use and privacy policy.