posted @ 2006-03-03 23:07 flyerabc 阅读(732) 评论(0) 编辑
摘要: 1. 主要控件名简写对照表控件名 简写控件名 简写Label lblTextBox txtButton btnLinkButtonlnkbtnImageButton imgbtn DropDownList ddlListBox lstDataGrid dgDataList dl CheckBoxchkCheckBoxListchkls RadioButtonrdoRadioButtonLis...阅读全文
posted @ 2006-03-03 21:04 flyerabc 阅读(886) 评论(4) 编辑
先创建一个与原表一样的表,然后在表上创建 ignore_dup_key 索引,如下:
CREATE UNIQUE INDEX removedups
ON #table_copy (name)
WITH IGNORE_DUP_KEY
ON #table_copy (name)
WITH IGNORE_DUP_KEY
然后在导入原表数据,简单吧![]()
posted @ 2006-02-22 19:12 flyerabc 阅读(399) 评论(0) 编辑
一断小代码,实现从数据库中获得图像
OleDbCommand cmd;
OleDbDataReader rdr;
int intBinaryBlobCol = 1;
int intOffset = 0;
int intBytesReturned;
int intChunkSize = 8192;
Byte[] aBinaryBlob = new byte[intChunkSize];
string strPathToFile = "getBytes.jpg";
FileStream fileOutput = new FileStream(strPathToFile, FileMode.Create);
rdr = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
rdr.Read();
do
{
intBytesReturned = (int)rdr.GetBytes(intBinaryBlobCol,intOffset,aBinaryBlob,0,intChunkSize);
if(intBytesReturned > 0 )
{
fileOutput.Write(aBinaryBlob,0,intBytesReturned);
}
intOffset += intBytesReturned;
}while(intBytesReturned == intChunkSize);
fileOutput.Close();
rdr.Close();
OleDbDataReader rdr;
int intBinaryBlobCol = 1;
int intOffset = 0;
int intBytesReturned;
int intChunkSize = 8192;
Byte[] aBinaryBlob = new byte[intChunkSize];
string strPathToFile = "getBytes.jpg";
FileStream fileOutput = new FileStream(strPathToFile, FileMode.Create);
rdr = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
rdr.Read();
do
{
intBytesReturned = (int)rdr.GetBytes(intBinaryBlobCol,intOffset,aBinaryBlob,0,intChunkSize);
if(intBytesReturned > 0 )
{
fileOutput.Write(aBinaryBlob,0,intBytesReturned);
}
intOffset += intBytesReturned;
}while(intBytesReturned == intChunkSize);
fileOutput.Close();
rdr.Close();
posted @ 2006-02-22 18:56 flyerabc 阅读(162) 评论(0) 编辑
