Access [modified]
-
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.Texttexteditpath 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