In most cases you'll want to create your database and it's schema as part of your applications first deployment. Depending on the scenario, you may create it on the client, or create it on the server, do the initial sync, then stream the file down to the client pre-populated.
Why would you create the database on the fly, rather than ship the initial database with your app?
While you could create the empty shell, and deploy it, you'll almost never want to start with a database that has data? Why? While in development, you'll have some set of data. Months later, when another user first installs your app that data may no longer be valid. Since most sync systems don't track deletes forever, you could wind up with data that is very stale, and now way to effectively update it.
本日志由 flyinweb 于 2012-01-04 11:01:27 发表到 DotNet专栏 中,目前已经被浏览 151 次,评论 0 次;
作者添加了以下标签: SQL Server Compact Edition;
首页只显示了部分日志内容,要查看日志的全部内容请阅读全文;
介绍
现在 ASP.NET 2.0 提供了对成员资格(用户名/密码凭据存储)和角色管理服务的内置支持。由于所有这些服务都是提供程序驱动的(Provider),因此可以方便地用您自己的自定义实现替换。
本日志由 flyinweb 于 2011-07-17 11:40:48 发表到 DotNet专栏 中,目前已经被浏览 793 次,评论 0 次;
作者添加了以下标签: Membership,RoleManager;
首页只显示了部分日志内容,要查看日志的全部内容请阅读全文;
This tutorial we will demonstrate how to access ASP.NET controls located in the LoggedInTemplate of a LoginView Control from the C# code behind class.
本日志由 flyinweb 于 2011-07-15 09:07:37 发表到 DotNet专栏 中,目前已经被浏览 2631 次,评论 2 次;
作者添加了以下标签: LoginView,Templated Controls;
首页只显示了部分日志内容,要查看日志的全部内容请阅读全文;
C# code to convert a network in CIDR notation (72.20.10.0/24) to an IP address range
本日志由 flyinweb 于 2011-01-28 11:15:24 发表到 DotNet专栏 中,目前已经被浏览 1541 次,评论 0 次;
作者添加了以下标签: CIDR2IPrange,CIDRtoIPrange;
首页只显示了部分日志内容,要查看日志的全部内容请阅读全文;
最近单位开发一个项目,其中需要用到自动升级功能。因为自动升级是一个比较常用的功能,可能会在很多程序中用到,于是,我就想写一个自动升级的组件,在应用程序中,只需要引用这个自动升级组件,并添加少量代码,即可实现自动升级功能。因为我们的程序中可能包含多个exe或者dll文件,所以要支持多文件的更新。
we have checked the posted file of the FileUpload and pass it to the IsImageFile() method that returns a Boolean type for checking the actual type of the posted file. If the file contains image extension such as “jpg”, “gif”, “bmp” and “png” then it will return TRUE else it will return false.
- private void StartUpLoad()
- {
- if (FileUpload1.HasFile)
- {
- HttpPostedFile postedFile = FileUpload1.PostedFile;
- if (IsImageFile(postedFile))
- {
- //Save image here
- }
- else
- {
- Response.Write("Invalid File, Cannot Upload!");
- }
- }
- else
- {
- Response.Write("Please select a File");
- }
- }
- protected bool IsImageFile(HttpPostedFile file)
- {
- bool isImage = false;
- System.IO.FileStream fs = new System.IO.FileStream(file.FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
- System.IO.BinaryReader br = new System.IO.BinaryReader(fs);
- string fileclass = "";
- byte buffer;
- try
- {
- buffer = br.ReadByte();
- fileclass = buffer.ToString();
- buffer = br.ReadByte();
- fileclass += buffer.ToString();
- }
- catch
- {
- return false;
- }
- finally
- {
- br.Close();
- fs.Close();
- }
- /*extension lists with codes
- *7173 gif
- *255216 jpg
- *13780 png
- *6677 bmp
- *239187 txt,aspx,asp,sql
- *208207 xls.doc.ppt
- *6063 xml
- *6033 htm,html
- *4742 js
- *8075 xlsx,zip,pptx,mmap,zip
- *8297 rar
- *01 accdb,mdb
- *7790 exe,dll
- *64101 bat
- */
- //only allow images jpg gif bmp png
- String[] fileType = { "255216", "7173", "6677", "13780" };
- for (int i = 0; i < fileType.Length; i++)
- {
- if (fileclass == fileType[i])
- {
- isImage = true;
- break;
- }
- }
- return isImage;
- }
.NET 3.5 发布功能强大的新控件(Winform&WebForm) —— Chart
11月25号,Scott在博客上发布了基于.NET Framework 3.5 SP1的图表控件——Chart,可在WinForm和WebForm下使用!并同时提供了大量的示例...
环境:
本地:Windows 2003+VS2008,IBM CSDK 3.50
远程:Red Hat Enterprise Linux AS release 4 (Nahant Update 5)+Informix Dynamic Server 2000 Version 9.21.UC2
现象:
创建ODBC数据源时,提示
- “---------------------------IBM Informix ODBC Error Message:---------------------------Test connection was NOT successful.[Informix][Informix ODBC Driver][Informix]Client host or user (informix@zzy-flyinweb) is not trusted by the server.-----------------------”
解决办法:
在远程服务器上创建/etc/hosts.equiv 文件,内容如下:
[root@datacenter ~]# cat /etc/hosts.equiv
zzy-flyinweb
59.57.251.62
现象:
报错:System.Data.Odbc.OdbcException: ERROR [42000] [Informix][Informix ODBC Driver][Informix]A syntax error has occurred.
解决办法:
请检查SQL语句是还正确
特别注意:VS2008在自动生成的SQL代码中,会将字段名及表名加[]号括起,而这可能会引起语法错误(不知是不是Informix的原因,去掉相关的中括号即可)
另外,OLEDB方式一直没有通过,原因未知
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱
http://www.2mysite.net/scriptencoder/screnc.asp 站长你好,看
你好,我发现一个问题,就是从mysqld2同步过来的数据,在mysqld1的
晕,我说是怎么回事情,原来我和你一样,忘记设置了活动分区