VBA 獲取資料庫內容

2021-05-24 07:30:41 字數 444 閱讀 6541

private sub commandbutton2_click()

if textbox2.text <> "" and textbox3.text <> "" then

dim cn as new adodb.connection

const constr = "provider=msdaora.oracle;data source=aaa;user id =aaa;password=aaa;"

cn.open constr

cn.execute 

"insert into vba (a,b) values ("& textbox2.text & "," & textbox3.text & ")"

msgbox "insert ok"

cn.close

cn = nothing

end if

end sub

獲取資料庫內容 php php如何獲取資料庫內容

php如何獲取資料庫內容 閱讀 68 php獲取資料庫內容怎麼?比如html中有個名為1.2.3的三個 資料庫有三種對應顏色,如何讓每乙個 背景顏色 從資料庫中取值顯示。處理 如 從資料庫根據 id 獲取顏色 function getcolor db,id if result db query se...

MFC資料庫操作 獲取資料庫內容

定義 recordsetptr 型變數 hresult hr recordsetptr prentrecordset hr prentrecordset.createinstance uuidof recordset if failed hr 呼叫其 open 方法,開啟乙個資料集 cstring ...

顯示資料庫內容

建立asp檔案後,include conn.asp檔案 然後就是 dim rs set rs server.createobject adodb.recordset rs.open select from 表名 cnn,1,1,adcmdtext rs就是記錄集。open後面是表名則最後引數為adc...