上一页 1 2 3 4 5 6 7 ··· 12 下一页
摘要: 在日常的sql server开发中,经常会用到Identity类型的标识列作为一个表结构的自增长编号。比如文章编号、记录序号等等。自增长的标识列的引用很大程度上方便了数据库程序的开发,但有时这个固执的字段类型也会带来一些麻烦。一、修改标识列字段值:有时,为了实现某种功能,需要修改类型为Identity自增长类型的字段的值,但由于标识列的类型所限,这种操作默认是不允许的。比如目前数据库有5条正常添加的数据,此时删除2条,那么如果再添加数据时,自增长的标识列会自动赋值为6,可这时如果想在插入数据时给赋值3呢,默认是不允许的。如果您特别想改变这个字段的值,完全由自己控制该标识字段值的插入,方法还是有 阅读全文
posted @ 2012-10-08 16:17 niky 阅读(1531) 评论(0) 推荐(0) 编辑
摘要: create table #Data(name varchar(100),row varchar(100),reserved varchar(100),data varchar(100),index_size varchar(100),unused varchar(100)) declare @name varchar(100) declare cur cursor for select name from sysobjects where xtype='u' order by name open cur fetch next from cur into @name while 阅读全文
posted @ 2012-10-08 16:16 niky 阅读(93946) 评论(3) 推荐(7) 编辑
摘要: select *,ROW_NUMBER() OVER(PARTITION BY FItemID ORDER BY FOrderPrice) as num into #t1 from ICStockBillEntry where finterid=@interid--select * into #t2 from #t1 where num=1 阅读全文
posted @ 2012-09-25 13:29 niky 阅读(732) 评论(0) 推荐(0) 编辑
摘要: Some Useful ExamplesString.Format("{0:$#,##0.00;($#,##0.00);Zero}", value);This will output "$1,240.00" if passed 1243.50. It will output the same format but in parentheses if the number is negative, and will output the string "Zero" if the number is zero.String.Format( 阅读全文
posted @ 2012-09-25 11:19 niky 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 这是从园里一位大哥那里拷来的代码,有时候还是非常管用的,原来T-SQL也是可以查询到变量的类型的,我真汗~~~~PRINT CAST(SQL_VARIANT_PROPERTY(20, 'BaseType') AS VARCHAR(50))PRINT CAST(SQL_VARIANT_PROPERTY(0.1, 'BaseType') AS VARCHAR(50))PRINT CAST(SQL_VARIANT_PROPERTY(20 / 0.1, 'BaseType') AS VARCHAR(50))DECLARE @a nvarchar(10)S 阅读全文
posted @ 2012-09-20 20:57 niky 阅读(605) 评论(0) 推荐(0) 编辑
摘要: 用Android开发手机游戏通常会用到eclipse工具。那么如何导入现有的项目到eclipse开发环境下,并进行修改和调试呢? 点击File菜单,分别选择Import->General->Existing Projects into Workspace,然后在Select root directory中Browse你想要加入的工程。然而我并没有成功,任我怎么点击Refresh都没有显示可用的Projects文件(你现在就可以试一试)。这是为什么呢?原来这种导入方法只适用于eclipse自己创建的工程,比如说,在别人的电脑上用eclipse创建了一个工程,然后就可以用这个办法导入到 阅读全文
posted @ 2012-09-15 21:25 niky 阅读(10717) 评论(0) 推荐(0) 编辑
摘要: 首先需要在manifest .xml中间中获取相应的权限<uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />public class HttpExampleActivity extends Activity { private static final String DEBUG_TAG = "HttpEx 阅读全文
posted @ 2012-09-14 21:25 niky 阅读(704) 评论(0) 推荐(0) 编辑
摘要: ** * Utility class for http request. * */ public class Utility { private static RequestParameters mRequestHeader = new RequestParameters(); public static final String BOUNDARY = "7cd4a6d158c"; public static final String MP_BOUNDARY = "--" + BOUNDARY; public static final String EN 阅读全文
posted @ 2012-09-14 08:13 niky 阅读(1723) 评论(0) 推荐(0) 编辑
摘要: <activity android:name=".ui.MyActivity" > <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter> 阅读全文
posted @ 2012-09-13 22:35 niky 阅读(1153) 评论(0) 推荐(0) 编辑
摘要: static final int PICK_CONTACT_REQUEST = 1; // The request codeprivate void pickContact() { Uri contacts = Uri.parse("content://contacts"); Intent pickContactIntent = new Intent(Intent.ACTION_PICK, contacts); pickContactIntent.setType(Phone.CONTENT_TYPE); // Show user only contacts w/ ph... 阅读全文
posted @ 2012-09-13 21:51 niky 阅读(299) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 12 下一页