小编Dan*_*any的帖子

SQL Server,删除一个或多个记录后不将记录插入正确的位置

我知道,这是一个非常基本的问题,但我在重新学习sql存储过程的过程中,这就是背后的问题:

I was practicing with some simple delete/insert routines, when encountered with this: if I ONLY insert records:

    1. dog

    2. cat

    3. t-rex

    4. llama

all is ok, then I call a delete procedure, passing the colum_ID to identify the record and delete it.

This is done correctly and all is OK

Then I call a insert procedure once again and the insert happens like this:

    1. dog

    2. cat

    5. snake**now this is wrong, right?**

    4. llama

And …

database sql-server stored-procedures sql-server-2008

2
推荐指数
1
解决办法
326
查看次数

将更新的XMLDocument另存为字符串(vb.net或其他.net语言.)

我在mySQL表的字段中有一个XMl字符串.我从该字符串加载XMLdocument(xmlDoc)然后搜索节点并更改属性.一切都很好.

然后我想以字符串格式保存对XMLDocument所做的更改,以便我可以在DB中更新我的表.我怎样才能做到这一点.?

如果我执行xmldoc.save(),那么它将保存一个XML文件.如何保存我所做的更改,而不是savig文件,将其保存为字符串,以便我可以将其保存在我的表中.

我真的不想将XML字符串解析为普通字符串来搜索我的参数并保存它.

我正在使用vb.net,但是如果你有其他.net语言的代码,没问题.数据库在MySQL中

xml vb.net

2
推荐指数
1
解决办法
6570
查看次数