2006-09-28 01:06:56
我来谈两句~ View Mode: Normal | Article List
1
Select data from an Excel sheet in MSSQL
[ 2007-06-22 15:10:08 | Author: Admin ]
select *
from openrowset('Microsoft.Jet.OLEDB.4.0'
,'Excel 8.0;HDR=YES;IMEX=1;DATABASE=d:\folder\excel.xls',Sheet1$)
-------NOTE------
Setting IMEX=1 tells the driver to use Import mode. In this state, the registry setting ImportMixedTypes=Text will be noticed. This forces mixed data to be converted to text. For this to work reliably, you may also have to modify the registry setting, TypeGuessRows=8. The ISAM driver by default looks at the first eight rows and from that sampling determines the datatype. If this eight row sampling is all numeric, then s...
Read More...
from openrowset('Microsoft.Jet.OLEDB.4.0'
,'Excel 8.0;HDR=YES;IMEX=1;DATABASE=d:\folder\excel.xls',Sheet1$)
-------NOTE------
Setting IMEX=1 tells the driver to use Import mode. In this state, the registry setting ImportMixedTypes=Text will be noticed. This forces mixed data to be converted to text. For this to work reliably, you may also have to modify the registry setting, TypeGuessRows=8. The ISAM driver by default looks at the first eight rows and from that sampling determines the datatype. If this eight row sampling is all numeric, then s...
Read More...
Send Mail with CDO
[ 2007-01-25 16:58:22 | Author: Admin ]
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" -->
<%
myMail = new ActiveXObject("CDO.Message");
myMail.Configuration.Fields.Item(cdoSendUsingMethod) = cdoSendUsingPort;
myMail.Configuration.Fields.Item(cdoSMTPServer) = "mail.mailserver.com";
myMail.Configuration.Fields.Item(cdoSMTPServerPort) = 25;
myMail.Configuration.
...<%
myMail = new ActiveXObject("CDO.Message");
myMail.Configuration.Fields.Item(cdoSendUsingMethod) = cdoSendUsingPort;
myMail.Configuration.Fields.Item(cdoSMTPServer) = "mail.mailserver.com";
myMail.Configuration.Fields.Item(cdoSMTPServerPort) = 25;
myMail.Configuration.
Read More...
Send Mail with JMail
[ 2007-01-25 16:44:22 | Author: Admin ]
Dim JMail
Set JMail = Server.CreateObject("JMail.Message")
JMail.Logging = true
JMail.Silent = true
JMail.MailServerUserName = "serverusername"
JMail.MailServerPassword = "password"
JMail.Charset = "utf-8"
JMail.From = "sender@xxx.com"
JMail.AddRecipient("recipient@xxx.com")
...Set JMail = Server.CreateObject("JMail.Message")
JMail.Logging = true
JMail.Silent = true
JMail.MailServerUserName = "serverusername"
JMail.MailServerPassword = "password"
JMail.Charset = "utf-8"
JMail.From = "sender@xxx.com"
JMail.AddRecipient("recipient@xxx.com")
Read More...
Send Mail in ASP.NET 2.0
[ 2007-01-17 23:17:21 | Author: Admin ]
public static void SendSMTPEMail(string strSmtpServer, string strFrom, string strFromPass, string strto, string strSubject, string strBody)
{
System.Net.Mail.SmtpClient client = new SmtpClient(strSmtpServer);
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential(strFrom, strFromPass);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
...
Read More...
{
System.Net.Mail.SmtpClient client = new SmtpClient(strSmtpServer);
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential(strFrom, strFromPass);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
...
Read More...
Send Mail in ASP.NET 1.x
[ 2007-01-17 23:16:35 | Author: Admin ]
private void Page_Load(object sender, System.EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To = "me@mycompany.com";
mail.From = "you@yourcompany.com";
mail.Subject = "this is a test email.";
mail.Body = "Some text goes here";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
...
Read More...
{
MailMessage mail = new MailMessage();
mail.To = "me@mycompany.com";
mail.From = "you@yourcompany.com";
mail.Subject = "this is a test email.";
mail.Body = "Some text goes here";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
...
Read More...
第一次做Gadget,有兴趣的朋友看看,呵呵~,写得比较烂
[ 2006-11-15 17:12:33 | Author: Admin ]
一段未完成的代码(推箱子游戏)
[ 2006-10-11 11:06:23 | Author: Admin ]
曾经心血来潮,想做一个推箱子游戏,但后来因为时间关系,始终没有完成,以下是写了一半的代码,只实现了地图初始化,没有加上动作控制。
Read More...
<script language=javascript>
var R = 10, C = 10;
var MAPS = [];
MAPS[0] = "0000000000000111000000012100000001011110011130321001203511100111131000000012100000001110000000000000";
MAPS[1] = "1111100000100510000010331011101030101210111011121001100002100100010010010001111001111100000000000000";
MAPS[2] = "00000000000111111
...var R = 10, C = 10;
var MAPS = [];
MAPS[0] = "0000000000000111000000012100000001011110011130321001203511100111131000000012100000001110000000000000";
MAPS[1] = "1111100000100510000010331011101030101210111011121001100002100100010010010001111001111100000000000000";
MAPS[2] = "00000000000111111
Read More...
制作简单的服务器性能测试页面
[ 2006-10-08 11:10:26 | Author: Admin ]
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft System Monitor">
<META NAME="Author" CONTENT="sunrise_chen@msn.com">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD><BODY>
<OBJECT ID="DISystemMonitor1" WIDTH="100%" HEIGHT="100%"
CLASSID="CLSID:C4D2D8E0-D1DD-11CE-940F-008029004347">
<PARAM NAME="Counter00001.Path" VALUE="\\SUNRISE\Memory\Available MBytes">
...<HEAD>
<META NAME="GENERATOR" Content="Microsoft System Monitor">
<META NAME="Author" CONTENT="sunrise_chen@msn.com">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD><BODY>
<OBJECT ID="DISystemMonitor1" WIDTH="100%" HEIGHT="100%"
CLASSID="CLSID:C4D2D8E0-D1DD-11CE-940F-008029004347">
<PARAM NAME="Counter00001.Path" VALUE="\\SUNRISE\Memory\Available MBytes">
Read More...
1







