There’s more than one way to do it

13 Jan
I m now staying at home and preparing things for leaving China. Time flies! The year 2007 has come, but I can’t forget 2006. Many things have happened to me in the past year, extremely in the end of 2006, my grandma left me and have gone far far away. Things always happen unconsciously and by tiny reasons. Wish I have a good start, and work well in the totally new environment~
7 Dec
根本原因:
访问数据库的用户有登录权限,但无操作表的权限
解决办法:
1. 在[企业控制台]窗口–[树]子窗口–[安全性]子树–[登录]项里将你使用的登陆用户的默认数据库设为你所使用的数据库。
2. 在[企业控制台]窗口–[树]子窗口–[安全性]子树–[登录]项里新增一个登录用户(在其中选择SQL Server 身份验证、服务器角色和要访问的数据库),以后便可用些新增用户访问你勾选的数据库了。
大家在用java连接ms sql时可能会这样的问题
原因是sa用户为系统用户,它虽然能够登陆数据库,但是数据库里边的权限都是dbo的,所以,我们现在为这个数据库重新建立一个用户.
当然,这个情况只发生在java里边. .net是不会这样的.
只要新建立一个用户,再在权限那分配权限做好就行了.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | public Connection getConnectionDB() { String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; String ConnectionString = "jdbc:microsoft:sqlserver://localhost:1433; DatabaseName=test;"; String userName = "username"; String userPwd = "password"; try { Class.forName(driverName); con = DriverManager.getConnection(ConnectionString, userName, userPwd); //System.out.println("Connection Successful!"); } catch (Exception e) { e.printStackTrace(); } return con; } ConnectionDB prod=new ConnectionDB(); Connection con=prod.getConnectionDB(); CallableStatement callStmt =null; java.sql.Statement stat = null; java.sql.ResultSet rs = null; stat = con.createStatement(); String sql="select * from table"; rs=stat.executeQuery(sql); |
19 Nov
Since that I hvn’t enjoyed Anime with my friends for a long time, I downloaded two from VeryCd and ready to enjoy today~

17 Nov
本文逐步介绍了如何在 Access 中重置“自动编号”字段值。在 Access 中删除某个表中的一些行或所有行时,“自动编号”字段不会自动重置。要重置“自动编号”字段值并刷新引用表中的“自动编号”值,必需手动执行一些任务。
17 Nov
今天老师教我们如何使用Visual Studio中集成的Crystal Reports(水晶报表)来制做显示在WinForm中的报表。哈哈,Crystal Reports的强大功能真令人兴奋。简单的几个步骤就能作出非常漂亮的报表来。以下便是我第一次用Crystal Reports做的报表啦:
12 Nov
From Wikipedia, the free encyclopedia
Object-Relational mapping (aka O/RM, ORM, and O/R mapping), is a programming technique that links databases to object-oriented language concepts, creating (in effect) a "virtual object database." There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to code their own object-relational mapping for their systems
5 Nov
5 Nov
软件名称:文件分割与合并
English Name: FileSplitter
简介:将大文件分割成指定大小的小文件以方便网络传输,然后再将小文件合并成大文件。可以将不同大文件分割成的小文件统一放在一个文件夹里,传输后,可以从该文件夹里自动提取并还原成对应的大文件。
大小:44K
版本:1.0.0.0
在线运行:Run
下载:
3 Nov
终于找到一个可以用"提康德罗加(Ticonderoga)" 注册的地方啦,左边就是我Tinconderoga的本源的啦~~
提康是笔者很喜欢的一级军舰.
修长的舰体,高大的烟囱,宏伟的舰桥,
(这个要特别赞一个,现在那些为了"隐身"而采用低矮舰桥的舰只都太娘娘腔了,稍微了解一点军舰的各位都会t)同意笔者的看法吧~~)
同时又充满现代化的气息,简直是艺术品啊~~~
(可能有点过誉了)
目前为止,提康很少发文,但还是希望大家支持!
预告以下,提康准备写篇文章纪念一下 Ticonderoga 们,敬请期待~~~
Recent Comments