如何使用vb.net获取整个访问数据库列以适应ms-word 2007中的一个书签? [英] How to get entire access database column to fit in one bookmark in ms-word 2007 using vb.net?
本文介绍了如何使用vb.net获取整个访问数据库列以适应ms-word 2007中的一个书签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用vb.net?
解决方案
让整个访问数据库列适合ms-word 2007中的一个书签,请给我时间回答这个问题,我真的需要这个我的论文... tnx
这是我的代码:
公共 Sub PRINTTORGRADES()
Data.con = 新 OleDbConnection
Dim cmd 作为 新 OleDbCommand(Data.PrintTORGrades(CurrentStudent),Data.con)
Data.OpenConn()
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
如果 dr.HasRows 然后
dr.Read()
Dim 成绩作为 字符串
等级= dr( 名称)
oDoc.Bookmarks.Item( FirstYear1)。Range.Text =等级
结束 如果
dr.Close()
结束 Sub
这只会将书签作为第一条记录而不是整列。
How to get entire access database column to fit in one bookmark in ms-word 2007 using vb.net?
解决方案
please give time to answer this, i really need this for my thesis...tnx
this is my code:
Public Sub PRINTTORGRADES() Data.con = New OleDbConnection Dim cmd As New OleDbCommand(Data.PrintTORGrades(CurrentStudent), Data.con) Data.OpenConn() Dim dr As OleDbDataReader dr = cmd.ExecuteReader() If dr.HasRows Then dr.Read() Dim Grades As String Grades = dr("Name") oDoc.Bookmarks.Item("FirstYear1").Range.Text = Grades End If dr.Close() End Sub
this only gives the bookmark the first record not the entire column.
这篇关于如何使用vb.net获取整个访问数据库列以适应ms-word 2007中的一个书签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文