⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 howto_database_picture.html

📁 Databasing picture files
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<HTML>
<META http-equiv="PICS-Label" content='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" by "RodStephens@vb-helper.com" for "http://www.vb-helper.com" on "1998.03.17T18:18-0800" r (n 0 s 0 v 0 l 0))'>
<HEAD>
<TITLE>VB Helper: HowTo: Save and restore pictures in a database using ADO with AppendChunk and GetChunk</TITLE>
<META NAME="Author" CONTENT="Rod Stephens">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Keywords" CONTENT="database, AppendChunk, GetChunk">
<META NAME="Keywords" CONTENT="database, AppendChunk, GetChunk">
<META NAME="Description" CONTENT="VB Helper: HowTo: Save and restore pictures in a database using ADO with AppendChunk and GetChunk">
<META NAME="Copyright" CONTENT="Copyright 1997-2003, Rocky Mountain Computer Consulting, Inc.">
<META NAME="Rating" CONTENT="General">
<META NAME="Robots" CONTENT="All">
</HEAD>

<BODY BGCOLOR="#E1F3FF" BACKGROUND="bg_blue.jpg">

  <!-- This table contains the banner, menu column, and content. -->
  <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
    <!-- ****** -->
    <!-- Banner -->
    <!-- ****** -->
    <TR><TD>
      <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="Left">
        <TR>
          <TD BACKGROUND="banner_mid.jpg"><IMG SRC="banner_l.jpg" WIDTH="410" HEIGHT="64"></TD>
          <TD BGCOLOR="#E1F3FF"><IMG SRC="banner_r.jpg" WIDTH="32" HEIGHT="64"></TD>
        </TR>
      </TABLE>
    </TD></TR>
    <TR><TD>&nbsp;</TD></TR>

    <!-- Menu column and content -->
    <TR><TD>
      <TABLE WIDTH="100%" BORDER="0" CELLSPACING="2" CELLPADDING="0">
        <!-- *********** -->
        <!-- Menu column -->
        <!-- *********** -->
        <TR>
          <TD ALIGN="Left" VALIGN="Top">
            <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
              <!-- Menu top -->
              <TR>
                <TD><IMG SRC="blue_ul.jpg" WIDTH="16" HEIGHT="16"></TD>
                <TD><IMG SRC="blue_um.jpg" WIDTH="93" HEIGHT="16"></TD>
                <TD><IMG SRC="blue_ur.jpg" WIDTH="16" HEIGHT="16"></TD>
              </TR>

              <!-- Menu entries -->
              <TR BGCOLOR="#7FCFFF">
                <TD BACKGROUND="blue_l.jpg" WIDTH="16">&nbsp;</TD>
                <TD><CENTER>
                  <A HREF="index.html"><B><FONT SIZE="+1">Home</FONT></B></A><BR>
                  <A HREF="search.html"><B>Search</B></A><BR>
                  &nbsp;<BR>
                  <A HREF="whats_new.html"><B>What's New</B></A><BR>
                  <A HREF="index_categories.html"><B>Index</B></A><BR>
                  <A HREF="books.html"><B>Books</B></A><BR>
                  <A HREF="links.html"><B>Links</B></A><BR>
                  <A HREF="http://www.topica.com/lists/VBHelperQA/read"><B>Q &amp; A</B></A><BR>
                  <A HREF="newsletter.html"><B>Newsletter</B></A><BR>
                  <A HREF="banners.html"><B>Banners</B></A><BR>
                  &nbsp;<BR>
                  <A HREF="mailto:feedback@vb-helper.com"><B>Feedback</B></A><BR>
                  <A HREF="tip_jar.html"><B>Tip Jar</B></A><BR>
                </CENTER></TD>
                <TD BACKGROUND="blue_r.jpg" WIDTH="16">&nbsp;</TD>
              </TR>

              <!-- Menu bottom -->
              <TR>
                <TD><IMG SRC="blue_ll.jpg" WIDTH="16" HEIGHT="16"></TD>
                <TD><IMG SRC="blue_lm.jpg" WIDTH="93" HEIGHT="16"></TD>
                <TD><IMG SRC="blue_lr.jpg" WIDTH="16" HEIGHT="16"></TD>
              </TR>

              <TR><TD HEIGHT="50" COLSPAN="3">&nbsp;</TR></TD>

              <!-- ***************** -->
              <!-- Amazon Recommends -->
              <!-- ***************** -->
              <TR><TD COLSPAN="3" ALIGN="Center">
<!-- -->
                <SCRIPT SRC="http://rcm.amazon.com/e/cm?t=vbhelper&l=rc1&p=2&o=1" TYPE="text/JavaScript"></SCRIPT>
<!-- -->
                <NOSCRIPT>
                  <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="125">
                    <TR><TD>
                      <MAP NAME="boxmap">
                        <AREA SHAPE="RECT" COORDS="18, 263, 105, 274" HREF="http://rcm.amazon.com/e/cm/privacy-policy.html?o=1">
                        <AREA COORDS="0,0,10000,10000" HREF="http://www.amazon.com/exec/obidos/redirect-home/vbhelper">
                      </MAP>
                      <img src="http://rcm-images.amazon.com/images/G/01/associates/amzn_recommends/gnbox125x275.gif" width="125" height="275" border="0" usemap="#boxmap">
                    </TD></TR>
                  </TABLE>
                </NOSCRIPT>
              </TD></TR>
              <TR><TD HEIGHT="50" COLSPAN="3">&nbsp;</TR></TD>

              <!-- ******** -->
              <!-- Partners -->
              <!-- ******** -->
              <!-- NetFlix -->
              <TR><TD COLSPAN="3" ALIGN="Center">
<IMG SRC="http://service.bfast.com/bfast/serve?bfmid=27276611&siteid=40078832&bfpage=s_120x60style4" BORDER="0" WIDTH="1" HEIGHT="1" NOSAVE >
<A HREF="http://service.bfast.com/bfast/click?bfmid=27276611&siteid=40078832&bfpage=s_120x60style4" TARGET="_top"><IMG SRC="http://a408.g.akamai.net/f/408/1284/24h/image.netflix.com/NetFlix_Assets/affiliates/banners/S12060v4.gif" BORDER="0" WIDTH="120" HEIGHT="60" ALT=""></A>
              </TR></TD>
              <TR><TD HEIGHT="10" COLSPAN="3">&nbsp;</TR></TD>

              <!-- Wiley -->
              <TR><TD COLSPAN="3" ALIGN="Center" BACKGROUND="sandpaper.gif"><A HREF="http://service.bfast.com/bfast/click?bfmid=37920629&siteid=40078832&bfpage=computer_science" TARGET="_top"><IMG SRC="wiley_logo.gif" BORDER="0" ALIGN="Center" WIDTH="77" HEIGHT="105"></TD></TR>
              <TR><TD HEIGHT="10" COLSPAN="3">&nbsp;</TR></TD>

              <!-- Que -->
              <TR><TD COLSPAN="3" ALIGN="Center"><A HREF="http://www.quepublishing.com"><IMG SRC="que.gif" BORDER="0" ALIGN="Center" WIDTH="121" HEIGHT="36"></A></TD></TR>
              <TR><TD HEIGHT="10" COLSPAN="3">&nbsp;</TR></TD>

              <!-- Amazon -->
              <TR><TD COLSPAN="3" ALIGN="Center"><A HREF="amazon.html"><IMG SRC="amazon_logo.gif" BORDER="0" ALIGN="Center" WIDTH="68" HEIGHT="65"></A></TD></TR>
              <TR><TD HEIGHT="100" COLSPAN="3">&nbsp;</TR></TD>

              <!-- ********** -->
              <!-- More stuff -->
              <!-- ********** -->

              <!-- Old Menu top -->
              <TR>
                <TD><IMG SRC="magenta_ul.jpg" WIDTH="16" HEIGHT="16"></TD>
                <TD><IMG SRC="magenta_t.jpg" WIDTH="93" HEIGHT="16"></TD>
                <TD><IMG SRC="magenta_ur.jpg" WIDTH="16" HEIGHT="16"></TD>
              </TR>

              <!-- Menu entries -->
              <TR BGCOLOR="#E36BFF">
                <TD BACKGROUND="magenta_lside.jpg" WIDTH="16">&nbsp;</TD>
                <TD><CENTER>
                  <B><FONT SIZE="+1">Old Pages</FONT></B><BR>
                  &nbsp;<BR>
                  <A HREF="old_index.htm"><B>Old Index</B></A></BR>
                  <A HREF="sitemap.htm"><B>Site Map</B></A></BR>
                  <A HREF="whatsnew.htm"><B>What's New</B></A></BR>
                  &nbsp;<BR>
                  <A HREF="books.htm"><B>Books</B></A></BR>
                  <A HREF="howto.htm"><B>How To</B></A></BR>
                  <A HREF="tips.htm"><B>Tips &amp; Tricks</B></A></BR>
                  <A HREF="tutorial.htm"><B>Tutorials</B></A></BR>
                  <A HREF="stories.htm"><B>Stories</B></A></BR>
                  <A HREF="perform.htm"><B>Performance</B></A></BR>
                  <A HREF="essays.htm"><B>Essays</B></A></BR>
                  <A HREF="links.htm"><B>Links</B></A></BR>
                  <A HREF="q_and_a.htm"><B>Q &amp; A</B></A></BR>
                  <A HREF="newvb6.htm"><B>New in VB6</B></A></BR>
                  <A HREF="free.htm"><B>Free Stuff</B></A></BR>
                  <A HREF="pictures.htm"><B>Pictures</B></A></BR>
                </CENTER></TD>
                <TD BACKGROUND="magenta_rside.jpg" WIDTH="16">&nbsp;</TD>
              </TR>

              <!-- Old Menu bottom -->
              <TR>
                <TD><IMG SRC="magenta_ll.jpg" WIDTH="16" HEIGHT="16"></TD>
                <TD><IMG SRC="magenta_b.jpg" WIDTH="93" HEIGHT="16"></TD>
                <TD><IMG SRC="magenta_lr.jpg" WIDTH="16" HEIGHT="16"></TD>
              </TR>

              <!-- Other stuff in the menu column -->
              <TR><TD HEIGHT="100" COLSPAN="3">&nbsp;</TR></TD>
            </TABLE>
          </TD>

          <!-- A little space between the menus and content -->
          <TD WIDTH="5">&nbsp;</TD>

          <!-- ******* -->
          <!-- Content -->
          <!-- ******* -->
          <TD WIDTH="100%" ALIGN="Left" VALIGN="Top">
            <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
              <!-- How To Summary -->
              <TR><TD>
                <TABLE WIDTH="100%" BORDER="2" CELLSPACING="0" CELLPADDING="2">
                  <TR><TH ALIGN="Left">Title</TH><TD WIDTH="100%">Save and restore pictures in a database using ADO with AppendChunk and GetChunk</TD></TR>
                  <TR><TH ALIGN="Left">Keywords</TH><TD>database, AppendChunk, GetChunk</TD></TR>
                  <TR><TH ALIGN="Left">Categories</TH><TD>Database, Graphics</TD></TR>
                </TABLE>
              </TD></TR>

              <!-- Text content -->
              <TR><TD>&nbsp;<BR></TD></TR>
              <TR><TD>
To add a new record, the program lets the user select a graphic file. The program opens the file and reads it in blocks of binary data. For each block, the program uses AppendChunk to add the block to the database
              </TD></TR>

              <!-- Code content -->
              <TR><TD>&nbsp;<BR></TD></TR>
              <TR>
                <TD BACKGROUND="computer_paper.jpg">
                  <PRE><FONT NAME="Courier New" POINT-SIZE="10" SIZE="2">Private Sub mnuRecordAdd_Click()
Dim rs As ADODB.Recordset
Dim person_name As String
Dim file_num As String
Dim file_length As String
Dim bytes() As Byte
Dim num_blocks As Long
Dim left_over As Long

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -