i writing program allows manager view tables in sql 2008 r2 database , make changes them. have thoroughly tested code on database hosted on development laptop , i've discovered no issues. however, when switch remote connection start getting errors.
the issue have attempt collect data database provides number of columns. if select * table query , put datagridview control. sqldatareader use collect data comes exact number of fields in table, no matter table select. also, code has no issues logging in database collect data. if run exact same code while targeting local database on laptop, of rows in table database.
so, getting data remote connection, it's getting number of columns in table , no rows. have tcp/ip connections enabled, i'm using server browser, , ports used sql , processes open on server.
anybody solution problem, or reason why it's happening, appreciated. thanks!
edit, solved: well, figured out problem was. app.config connection string off 2 characters , grabbing data older copy of current database. that's why getting same number of columns in database still failing write data tables had. same number of columns, different column names. when went assign data looking "producttype" (the new database) instead of "producttypeid" (older database).
Comments
Post a Comment