Hi all,
I'm using OleDbCommandBui lder to build commands for an OleDbDataAdapte r
automatically
The problem is when using OleDbDataAdapte r to retrieve data from a "View" in
a SQL Express database
Ex: OleDbDataAdapte r("select * from ViewName", ConnectionStrin g);
The generated CommandText for generated commands is invalid, it looks like
this:
InsertCommand ex: INSERT INTO
D:\\FOLDER_NAME \\DATABASE_FILE _NAME.MDF.dbo.T ableName
DeleteCommand ex: DELETE FROM
D:\\FOLDER_NAME \\DATABASE_FILE _NAME.MDF.dbo.T ableName
UpdateCommand ex: UPDATE D:\\FOLDER_NAME \\DATABASE_FILE _NAME.MDF.dbo.T ableName
Where TableName is the source table of the "View" !!!
Ofcource executing command causes an error of "Incorrect syntax near 'D:'"
Notice that, this problem doesn't occur with tables, only with views !!
Please help
I'm using OleDbCommandBui lder to build commands for an OleDbDataAdapte r
automatically
The problem is when using OleDbDataAdapte r to retrieve data from a "View" in
a SQL Express database
Ex: OleDbDataAdapte r("select * from ViewName", ConnectionStrin g);
The generated CommandText for generated commands is invalid, it looks like
this:
InsertCommand ex: INSERT INTO
D:\\FOLDER_NAME \\DATABASE_FILE _NAME.MDF.dbo.T ableName
DeleteCommand ex: DELETE FROM
D:\\FOLDER_NAME \\DATABASE_FILE _NAME.MDF.dbo.T ableName
UpdateCommand ex: UPDATE D:\\FOLDER_NAME \\DATABASE_FILE _NAME.MDF.dbo.T ableName
Where TableName is the source table of the "View" !!!
Ofcource executing command causes an error of "Incorrect syntax near 'D:'"
Notice that, this problem doesn't occur with tables, only with views !!
Please help