471,310 Members | 990 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

OleDbCommandBuilder Problem with views in SQL Express 2005

Hi all,

I'm using OleDbCommandBuilder to build commands for an OleDbDataAdapter
automatically

The problem is when using OleDbDataAdapter to retrieve data from a "View" in
a SQL Express database
Ex: OleDbDataAdapter("select * from ViewName", ConnectionString);

The generated CommandText for generated commands is invalid, it looks like
this:
InsertCommand ex: INSERT INTO
D:\\FOLDER_NAME\\DATABASE_FILE_NAME.MDF.dbo.TableN ame
DeleteCommand ex: DELETE FROM
D:\\FOLDER_NAME\\DATABASE_FILE_NAME.MDF.dbo.TableN ame
UpdateCommand ex: UPDATE D:\\FOLDER_NAME\\DATABASE_FILE_NAME.MDF.dbo.TableN ame

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
Jun 27 '08 #1
0 896

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Bootstrap Bill | last post: by
reply views Thread by PSiegmann | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.