Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Access [modified]

Access [modified]

Scheduled Pinned Locked Moved Database
helpdatabasequestioncsharpdesign
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    udikantz
    wrote on last edited by
    #1

    hi guys, i am developing an application which uses access mdb files as database. untill now i used a connection to the files, using the following code:

    Public Class DBconnector

    Private \_dbConnection As OleDbConnection
    Private \_dbCommand As OleDbCommand
    Private \_dbDataReader As OleDbDataReader
    Private \_dbDataAdapter As OleDbDataAdapter
    Private \_dbTransaction As OleDbTransaction
    'Private \_dbADODBConnection As ADODB.
    
    
    Public Sub New(ByVal cs As String)
    
        \_dbConnection = New OleDbConnection(cs)
        \_dbCommand = \_dbConnection.CreateCommand
    
    End Sub
    

    where the connection string is:

    "Provider=Microsoft.Jet.OLEDB.4.0;"
    & "Data Source=" & TextEditPath.Text

    texteditpath is the file path and name. recently i have encountered an error while trying to create a relationship using "ON DELETE CASCADE" in the constraint clause. error mentioned theres a syntax error on the constraint clause and there was no real syntax error , after troling microsoft forums , they have told me i need to use ADO connection because this bug results cause of use in DAO , also i may add that when i execute the query in the imidiate debug widow of access 2007 it is executed with no errors , how ever when i execute it on the SQL design window of access 2007 i get the same error as i get in the .net frame work my question is how do i establish an ADO connection to access MDB file or how do i over come this bug , please help im stuck with this for a week now , thanks...

    Net

    modified on Tuesday, March 17, 2009 4:09 AM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups