?? 9037.html
字號:
<html>
<head>
<title>Re: 如何使用DBGrid 在非連接摸式(unband) 下寫入資料</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 如何使用DBGrid 在非連接摸式(unband) 下寫入資料</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by tt on January 11, 1999 at 12:03:05:<p>
In Reply to: <a href="9011.html">如何使用DBGrid 在非連接摸式(unband) 下寫入資料</a> posted by TimLiu on January 09, 1999 at 18:13:10:<p>
This example illustrates the use of the UnboundAddData event to add a row of data to a database, in this case, a simple array.<p>Private Sub DBGrid1_UnboundAddData(ByVal RowBuf As RowBuffer, NewRowBookmark As Variant)<br>Dim Col%<p>mTotalRows = mTotalRows + 1<br>ReDim Preserve UserData(MAXCOLS - 1, mTotalRows - 1)<br>'Sets the bookmark to the last row.<br>NewRowBookmark = mTotalRows - 1 <p>' The following loop adds a new record to the database.<br>For Col% = 0 To UBound(UserData, 1)<br> If Not IsNull(RowBuf.Value(0, Col%)) Then<br> UserData(Col%, mTotalRows - 1) = RowBuf.Value(0, Col%)<p> Else<br> ' If no value set for column, then use the <br> ' DefaultValue<br> UserData(Col%, mTotalRows - 1) = DBGrid1.Columns(Col%).DefaultValue<br> End If<br>Next Col%<br>End Sub<br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 9037-->
</ul><!--end: 9037-->
<br><hr size=7 width=75%><p>
</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -