Thursday, March 29, 2012
database compatibility level
to ver. 7.0. We've just observed that for all of our
databases, the database compatibility level remains at 65.
My concern here is... can we change this compatibility
level to 70 on the fly? Would this incur an outage of any
sort? Are there any precautions that I should be aware of
before set the database compatibility level to 70?
Thanks in advance for your help and suggestions.You can certainly change on the fly, but there will be some semantic =changes to the SQL that may catch out your application. BOL has a =summary of the differences, but it is things like:
SELECT 'a' + '' + 'b' -- Nothe there is no space between the middle pair =of single quotes -
At 65 will give 'a b' - ie the zerolength string is interpreted as a =single space.
At 7 will give 'ab' - which I would say is right.
Others such as =3D NULL behaving non-standard at 65 but fixed at 7 can =catch you if the app uses it.
BOL has a description of all the differences.
Mike John
"Rob" <rhchin@.hotmail.com> wrote in message =news:01fc01c3425c$c76bc8a0$a301280a@.phx.gbl...
> A couple of weeks ago we had upgraded our SQL Server 6.5 > to ver. 7.0. We've just observed that for all of our > databases, the database compatibility level remains at 65.
> > My concern here is... can we change this compatibility > level to 70 on the fly? Would this incur an outage of any > sort? Are there any precautions that I should be aware of > before set the database compatibility level to 70?
> > Thanks in advance for your help and suggestions.
Wednesday, March 7, 2012
DataAdapter.Update does not work with DataSet.Merge!!!!
Hi Everybody,
I am Updating server database with data from client database, I am using mySQL Ver 4.1, I am unable to do that. What should I do to change the codes to make it work? I have also another method that do the opposite data from server updates the database on client side. I need help. There is no change in records of target database. I have saw some topics here at this forum. The problem is Connection to server database is ok, but when odAdapter.Update(ds,"<tablename>"); executes it returns value of 0 and on changes made to server database, it should have 12 rows. Advanced Thanks.
Code:
public int UpdateServerTable1(DataTable dtObj)
{
DataSet ds = new DataSet();
int iRes = 0;
try
{
this.sqlTextServer = "Select * From <tablename>";
OdbcDataAdapter odAdapter = new OdbcDataAdapter(this.sqlTextServer,this.odServerConn );
odAdapter.Fill(ds,"<tablename>");
ds.Merge(dtObj,true,MissingSchemaAction.Ignore);
OdbcCommandBuilder cmdBuild = new OdbcCommandBuilder(odAdapter);
iRes = odAdapter.Update(ds,"<tablename>");
}
catch (Exception ex)
{
ds.RejectChanges();
}
return iRes;
}
Regards,
denpsia
Hi,
Check the state of every row. Determine if the RowState of the rows in dtObj was changed to Unchanged. also try inspecting your UpdateCommand and InsertCommand see if the command builder generated the correct sql syntax...
cheers,
Paul June A. Domag