C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Access Database


Posted Date: 27 Oct 2006      Total Responses: 2

Posted By: Samuel chukudu       Member Level: Gold     Points: 2


Hi
Using VB.Net (Web Forms) MS Access Database

I have created my queries on MS Access, so how do i call that Query on my Code.
The problem is that i have already created my Query on MS Access so i dont want to include a Query in my Code, I just want to call that Query Name and Retreive Information.
So How do i do that.

Thank in Advance




Responses

Author: Mohan Kumar    27 Oct 2006Member Level: DiamondRating:     Points: 2
hi,


Dim cmd As OleDbCommand
Dim con As OleDbConnection = New OleDbConnection(" Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\hai.mdb")
cmd = New OleDbCommand
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "mm" 'here give ur query name
con.Open()
cmd.ExecuteNonQuery()
con.Close()


Author: Mohan Kumar    27 Oct 2006Member Level: DiamondRating:     Points: 2
hi,

try this.


Dim cmd As OleDbCommand
Dim con As OleDbConnection = New OleDbConnection(" Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\hai.mdb")
cmd = New OleDbCommand
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "mm" 'here give ur query name
con.Open()
cmd.ExecuteNonQuery()
con.Close()

-Mohan kumar


Post Reply
You must Sign In to post a response.
Next : get the CPU usage value?
Previous : how to call asp.net function in javascript
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

teleconferencing service

Contact Us    Privacy Policy    Terms Of Use