vbscript 来自http://www.functionx.com/ado/Lesson07.htm

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 来自http://www.functionx.com/ado/Lesson07.htm相关的知识,希望对你有一定的参考价值。

' You dont have to provide data for all columns, just those you want, in the order you want. To do this, enter the names of the desired columns on the right side of the name of the table, in parentheses. The syntax used would be:

INSERT TableName(ColumnName1, Columnname2, ColumnName_n)

VALUES(ValueFormColumnName1, ValueFormColumnName2, ValueFormColumnName_n);
' The adjacent data entry requires that you know the position of each column. The SQL provides
' an alternative that allows you to perform data entry using the name of a column 
' instead of its position. This allows you to provide the values of fields in any order of your choice.

' To perform data entry at random, you must provide a list of the columns 
' of the table in the order of your choice. You can either use all columns or
' provide a list of the same columns but in your own order.  Here is an example:

Private Sub btnCreateRecord_Click(ByVal sender As System.Object, _

                    ByVal e As System.EventArgs) Handles btnCreateRecord.Click

        Dim conPeople As New ADODB.ConnectionClass



        conPeople.Open("Provider=Microsoft.Jet.OLEDB.4.0;" & _

                       "Data Source='C:\Programs\People.mdb'", Nothing, Nothing, 0)

  conPeople.Execute("INSERT INTO Persons(LastName, Gender, FirstName) " & _

                             "VALUES('Germain', 'Male', 'Ndongo');")

        MsgBox("A new record has been created in the Persons table")

        conPeople.Close()

End Sub

以上是关于vbscript 来自http://www.functionx.com/ado/Lesson07.htm的主要内容,如果未能解决你的问题,请参考以下文章

vbscript 来自http://www.functionx.com/ado/Lesson07.htm

vbscript 将来自不同工作簿的所有工作表合并到一个工作簿中

vbscript 来自http://cloud.gestar.com/com/inc/tools/gexec.asp

vbscript 来自http://www.tek-tips.com/viewthread.cfm?qid=1610438

vbscript 其他VBA - 来自:<script src =“https://gist.github.com/pudelosha/c997c6091fbb4103e5fe1dc21692

创建一个将在表格中显示来自文件名的多个图像的报告