📄 subject_17114.htm
字号:
<p>
序号:17114 发表者:dxboy 发表日期:2002-10-08 16:08:08
<br>主题:我想请问一下在HTML下如何访问数据库文件
<br>内容:我现在要把.DB的数据库文件里的数据统计一下并用网页显示出来<BR>想问一下如何使该文件与网页连接起来,使得网页可以访问数据库文件<BR><BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:黄飚 回复日期:2002-10-08 16:10:00
<br>内容:你在ASP 用ADO组件即可,你查一下ASP的书,大把例子
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dxboy 回复日期:2002-10-08 16:13:37
<br>内容:我只要把.db文件中的数据导出来,有没有简单一点的方法呀
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:黄飚 回复日期:2002-10-08 16:39:25
<br>内容: CString strFilePath = strPathName;<BR> m_strFileName =strFilePath + _T("\\PatientExamTmpReport.htm");<BR> //create a stdio file<BR> //file full path is C:\Temp\Exam\PatientExamTmpReport.htm<BR> m_pFile = new CStdioFile;<BR> CFileException e;<BR> <BR> if( !m_pFile->Open( m_strFileName, CFile::modeCreate | CFile::modeWrite, &e ) )<BR> {<BR> #ifdef _DEBUG<BR> afxDump << "File could not be opened " << e.m_cause << "\n";<BR> #endif<BR> return FALSE;<BR> }<BR> m_strReportTitle = "Examination Report";<BR> return TRUE;<BR><BR><BR>CStdioFile* Report::GetFile ()<BR>{<BR> //## begin Report::GetFile%390AB62103AF.body preserve=yes<BR> return m_pFile;<BR> //## end Report::GetFile%390AB62103AF.body<BR>}<BR><BR>然后用Html语法往这个文件里写<BR> // Get the style information of the cell;<BR> CString strStyleInfo = html_table_cell_tr_begin_flag;<BR> // get the alignment of the cell in horizontal direction<BR> long nAH = cellformat.GetAlignHorizontal();<BR> strStyleInfo += html_double_quotation_mark; <BR> if( nAH == 2 )<BR> strStyleInfo += _T("left"); <BR> else if( nAH == 4 )<BR> strStyleInfo += _T("right"); <BR> else<BR> strStyleInfo += _T("center"); <BR> strStyleInfo += html_double_quotation_mark; <BR> // get the background color info<BR> strStyleInfo += html_table_cell_bkcolor_flag;<BR> unsigned long nBkcolor = cellformat.GetPatternFG();<BR> CString strBkColor;<BR> strBkColor.Format("%X",nBkcolor);<BR> //CString str = strBkColor;<BR> strStyleInfo += strBkColor;<BR><BR> // get the alignment of the cell in vertical direction<BR> strStyleInfo += html_table_cell_valign_flag;<BR> long nAV = cellformat.GetAlignVertical();<BR> strStyleInfo += html_double_quotation_mark; <BR> if( nAV == 1 )<BR> strStyleInfo += _T("top"); <BR> else if( nAV == 3 )<BR> strStyleInfo += _T("bottom"); <BR> else<BR> strStyleInfo += _T("center"); <BR> strStyleInfo += html_double_quotation_mark; <BR><BR> // Judge if it is a merged cell<BR> if(cellformat.GetMergeCells())<BR> {<BR> strStyleInfo += html_table_cell_colspan_flag;<BR> strStyleInfo += html_double_quotation_mark; <BR> strStyleInfo += _T("8");<BR> strStyleInfo += html_double_quotation_mark; <BR> }<BR><BR> // get the cell height<BR> strStyleInfo += html_table_cell_height_flag;<BR> CString strHeight;<BR> strHeight.Format(_T("%d"),nRowHeight);<BR> strStyleInfo += html_double_quotation_mark;<BR> strStyleInfo += strHeight;<BR> strStyleInfo += html_double_quotation_mark;<BR> // get the cell width<BR> strStyleInfo += html_table_cell_width_flag;<BR> CString strWidth;<BR> strHeight.Format(_T("%d"),m_SpreadsheetBook.GetColWidth(nCol)/20);<BR> strStyleInfo += html_double_quotation_mark;<BR> strStyleInfo += strWidth;<BR> strStyleInfo += html_double_quotation_mark;<BR> // Cell style info end;<BR> strStyleInfo += html_table_cell_tr_end_flag;<BR> <BR> /////////////////////////////////<BR> // Get the content information of the text of this cell;<BR> CString strTextInfo;<BR> // get the text of the cell.<BR> if(strCellContent[0] != _T('#') )<BR> {<BR> strTextInfo = html_table_cell_body_begin_flag + html_table_cell_font_begin_flag;<BR> // get the font color;<BR> unsigned long nFontcolor = cellformat.GetFontColor();<BR> CString strFontColor;<BR> strFontColor.Format("%X",nFontcolor);<BR> strTextInfo += strFontColor;<BR> // get the font size<BR> strTextInfo += html_table_cell_text_size_flag;<BR> int nSize = int(cellformat.GetFontSize()/3.5f);// convert twip to inch;<BR> CString strSize;<BR> strSize.Format(_T("%d"),nSize);<BR> strTextInfo += html_double_quotation_mark;<BR> strTextInfo += strSize;<BR> strTextInfo += html_double_quotation_mark;<BR> // get the font name;<BR> strTextInfo += html_table_cell_text_font_name_flag;<BR> CString strFontName = cellformat.GetFontName();<BR> strTextInfo += html_double_quotation_mark;<BR> strTextInfo += strFontName;<BR> strTextInfo += html_double_quotation_mark;<BR> strTextInfo += html_end_bracket;<BR> // judge if the text has underline.<BR> BOOL bUnderline = cellformat.GetFontUnderline();<BR> if( bUnderline )<BR> strTextInfo += html_table_cell_text_underline_begin_flag;<BR> // add the text content.<BR> CString strFormattedText = m_SpreadsheetBook.GetFormattedTextSRC(REPORT_SHEET,nRow,nCol);<BR> strTextInfo += strFormattedText;//strCellContent;<BR> if( bUnderline )<BR> strTextInfo += html_table_cell_text_underline_end_flag;<BR> strTextInfo += html_table_cell_font_end_flag;<BR> strTextInfo += html_table_cell_body_end_flag;<BR> strTextInfo += html_table_cell_end_flag;<BR> // end the text information.<BR> }<BR> else<BR> {<BR> strTextInfo = html_table_cell_font_begin_flag;<BR> // get the font color;<BR> unsigned long nFontcolor = cellformat.GetFontColor();<BR> CString strFontColor;<BR> strFontColor.Format("%X",nFontcolor);<BR> strTextInfo += strFontColor;<BR> strTextInfo += html_end_bracket;<BR> strTextInfo += html_table_cell_font_end_flag;<BR> strTextInfo += html_table_cell_body_end_flag;<BR><BR>给点分鼓励一下,谢谢<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:黄飚 回复日期:2002-10-08 21:36:45
<br>内容:怎么还不给分,我等不了了
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dxboy 回复日期:2002-10-09 08:00:50
<br>内容:不好意思我昨天下班了,你能不能把你的qq留给我,如果有问题我想再问问你,谢谢<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:黄飚 回复日期:2002-10-09 08:23:40
<br>内容:好啊!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dxboy 回复日期:2002-10-09 11:26:31
<br>内容:我的qq是4073668,哪次你上网时记得加我一下吧
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:黄飚 回复日期:2002-10-09 11:43:30
<br>内容:分太少了吧,我还要靠他上榜
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -