English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi, I make a program using VB 6.0 And MSSQL 2005, when i try to delete a record on the table i receive a error message that say "Object Require" but i don't know whats is the problem. This is the string that i use.

adoPrimaryRS.Open "DELETE FROM Caps WHERE ProjectName '" & DataCombo1.Text & "' ", A_frmODBCLogon.gConnection, adOpenDynamic, adLockPessimistic

2007-09-09 15:16:36 · 3 answers · asked by Sir Carden 1 in Computers & Internet Programming & Design

3 answers

Hi,
First u should have a connection object. That will access ur database.
Then in connection object there is another method called "Execute".
Suppose con is ur conection object then use the following:

con.Execute "Delete from Caps where ProjectName= '" & DataCombo1.Text & "'"

2007-09-09 18:13:29 · answer #1 · answered by iqbal 4 · 0 0

adoPrimaryRS.Open
Is used to open a recordset. DELETE does not return a record set. You need to use something like an EXECUTE method. Look up Execute.

2007-09-09 15:25:58 · answer #2 · answered by skorskiw 2 · 0 0

you may in all likelihood acquire sq. utility from the internet someplace. seen elementary is diverse: you may desire to purchase it - attempt eBay. seen elementary is lots harder to income. this is an entire featured programming language yet as quickly as mastered you may build finished information superhighway web content. sq. is a less difficult language designed to go with and examine records from databases. i've got self belief you ought to use sq. to ascertain from get admission to databases (no longer Excel) yet you will possibly in all likelihood be extra useful off to apply the strategies provided in get admission to.

2016-10-18 12:05:12 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers