Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Delete a row in a table and simultaneously delete it in the database


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-24-2007, 01:47 PM
Newbie
 
Join Date: Aug 2007
Posts: 4
Default Delete a row in a table and simultaneously delete it in the database

Hello,

I have a table which is filled in by a database and I want to delete data in the database, after I have selected a row in the table.

I give you the code of my SQL request

Con.New1
Cmd.New1("",con.Value)
Con.Open("Data Source = " & AppPath & "\relevegeneraux.sl3")
cmd.CommandText = "DELETE from gaz WHERE ROWID = idrow1"
Cmd.ExecuteNonQuery
Con.Close

I don't know how to make idrow1 appear as a variable in the request.

Thank You
Reply With Quote
  #2 (permalink)  
Old 12-24-2007, 02:01 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
Default

CommandText is just a string, so you should use '&' to insert a variable inside:
Code:
 cmd.CommandText = "DELETE from gaz WHERE ROWID = " & idrow1
Reply With Quote
  #3 (permalink)  
Old 12-25-2007, 02:23 PM
Newbie
 
Join Date: Aug 2007
Posts: 4
Default

Thank you very much
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete from SQLlite ceaser Questions & Help Needed 2 08-24-2008 08:29 AM
Delete keypress emaster Questions & Help Needed 2 12-04-2007 07:15 AM
Delete Control and Delete Form Items alfcen Basic4ppc Wishlist 3 10-05-2007 01:09 PM
Delete a simple row in a database... albert Questions & Help Needed 3 07-01-2007 08:44 PM
Delete rows in table sefi Questions & Help Needed 2 04-30-2007 08:05 PM


All times are GMT. The time now is 01:49 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0