Archive for 四月, 2007

ADO连接数据库的一个warning解决

关于Warning C4146:
一元负运算符应用于无符号类型,结果仍为无符号类型
无符号类型只能保存非负值,所以一元负(非)应用于无符号类型时通常无意义。操作数和结果都是非负的。
Read the rest of this entry »

评论

Warning LNK4098 : defaultlib “library” conflicts with use of other libs; use /NODEFAULTLIB:library

MSDN上的解释为: You are trying to link with incompatible libraries. Important   The run-time libraries now contain directives to prevent mixing different types. You’ll receive this warning if you try to use different types or debug and non-debug versions of the run-time library in the same program. For example, if you compiled one file to use one kind of run-time library and another file to use another kind (for example, single-threaded versus multithreaded) and tried to link them, you’ll get this warning. You should compile all source files to use the same run-time library. 总之,一句话,lib之间有冲突。需要删除导入的一些libs
Read the rest of this entry »

评论

Using Visual C++ 6.0 to connect to MySQL

VC++ 6.0 project settings for MySQL
Working Properly with VC++ 6.0 SP6. MySQL 5.0

win32 debug

C/C++:
code generation-> processor ->pentium
code generation-> Use run time librarty-> Multithreaded
optimizations-> Disable(Debug)
precompliled headers-> not using
Link:
Input->kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libmysql.lib mysys-nt.lib regex.lib strings.lib zlib.lib
Input-> Ignore libraries: LIBCMTD.lib
Input-> Additional library path-> C:\Program Files\MySQL\MySQL Server 5.0\lib\opt

项目选项里,按上面的设置进行配置,代码方面跟Unix c使用C api差不多.

Comments (2)

Windows下使用CA验证的OpenVPN Server的配置方法

应N多网友的要求,决定开始写Windows下OpenVPN的安装手册了,其实Windows下比linux简单,
因为使用网站提供的安装包,很容易就把OpenVPN安装上了,只需配置就OK了。

本文描述如何在Windows下使用CA的OpenVPN Server的配置方法。

有疑问大家关注:

http://elm.freetcp.com

http://wenzk.cublog.cn

不废话了,下面开始吧:) Read the rest of this entry »

评论

在华为交换机上查询MAC地址与IP地址与相应端口对照表

如何在华为交换机上查询MAC地址?可以用display mac,假如想查询某端口上的MAC地址可以用dis mac int port-number。

那如何在交换机上显示MAC与IP地址的对应关系呢?可以用dis arp命令。假如想知道某端口上的IP地址与MAC地址的对应关系,可以用display arp | include port_number命令。注意:该命令的端口必须用全称如GigabitEthernet6/0/5而不能用G6/0/5,但我建议只使用6/0/5就OK了

是不是觉得对你有用呢?别忘了顶一个哦,呵呵,下面给个例子:

[CoreSwitch-S6506R]dis arp | include 6/0/5
            Type: S-Static   D-Dynamic
IP Address      MAC Address    VLAN ID Port Name             Aging Type Vrf Name
192.168.6.136   0050-da8f-3240 6       GigabitEthernet6/0/5  7     D
192.168.6.119   0001-6cc2-bc4a 6       GigabitEthernet6/0/5  13    D
192.168.6.242   0011-5b73-9805 6       GigabitEthernet6/0/5  15    D
192.168.6.199   00e0-4cd3-d6e7 6       GigabitEthernet6/0/5  17    D
192.168.6.35    0016-ec1d-845f 6       GigabitEthernet6/0/5  17    D
192.168.6.10    0014-2aaa-8cb2 6       GigabitEthernet6/0/5  17    D
192.168.6.17    000a-ebf9-e876 6       GigabitEthernet6/0/5  18    D
192.168.6.67    0014-7832-d9ca 6       GigabitEthernet6/0/5  20    D

—   1671 entries found   —

Comments (1)

如何把MS SQL SERVER7.0现有的“*.MDF”导入到现有的SERVER2000中

EXEC   sp_attach_single_file_db   @dbname   =   ‘yourdbname’,
@physname   =   ‘c:\mssql7\data\police_jia.mdf’

在查询查那里执行就行了。

评论

升级手机ucweb

很久没有用手机上网了.今天无聊就用手机上网.结果发现,软件已经不可以使用.花了很大功夫才升级好那软件.好饿呀!是吃过一些东西,还是很饿

Comments (1)