Hello,
I have a DBF table, connection is okay, can select necessary records and
fill into dataset,
but can't delete and update them, can anyone please help me on how to do
this/
thanks in advance,
Adriano 12 5045
When you say you can't delete, what do you mean? For instance, have you
written the commands and the fields aren't deleting, do you need help
writing the commands, or are you looking for the GUI tools to work and they
aren't? If you can tell me a little more abou tyour situation, I can be of
more help (I hope ;-P)
"Adriano" <ad*****@mail.ru> wrote in message
news:OG*************@TK2MSFTNGP14.phx.gbl... Hello,
I have a DBF table, connection is okay, can select necessary records and fill into dataset, but can't delete and update them, can anyone please help me on how to do this/
thanks in advance, Adriano
Hello Ryan,
thanks for your reply,
I'm not looking for GUI tools for deleting, I just want my vb.net DELETE
query to work. When I execute the following query:
cmd.CommandText = "DELETE FROM `310705` WHERE SAN = '25107'
there's no error message, it seems okay but actually rows containing SAN =
'25107' is not removed. SELECT and INSERT statements work fine.
I have ODBC connection and dataadapter.
Regards,
Adriano
"W.G. Ryan eMVP" <Wi*********@gmail.com> сообщил/сообщила в новостях
следующее: news:O1*************@TK2MSFTNGP15.phx.gbl... When you say you can't delete, what do you mean? For instance, have you written the commands and the fields aren't deleting, do you need help writing the commands, or are you looking for the GUI tools to work and they aren't? If you can tell me a little more abou tyour situation, I can be of more help (I hope ;-P) "Adriano" <ad*****@mail.ru> wrote in message news:OG*************@TK2MSFTNGP14.phx.gbl... Hello,
I have a DBF table, connection is okay, can select necessary records and fill into dataset, but can't delete and update them, can anyone please help me on how to do this/
thanks in advance, Adriano
Hi,
Dont put the tablename in ' '
cmd.CommandText = "DELETE FROM 310705 WHERE SAN = '25107'"
Ken
--------------
"Adriano" <ad*****@mail.ru> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl... Hello Ryan,
thanks for your reply, I'm not looking for GUI tools for deleting, I just want my vb.net DELETE query to work. When I execute the following query: cmd.CommandText = "DELETE FROM `310705` WHERE SAN = '25107'
there's no error message, it seems okay but actually rows containing SAN = '25107' is not removed. SELECT and INSERT statements work fine.
I have ODBC connection and dataadapter.
Regards, Adriano
"W.G. Ryan eMVP" <Wi*********@gmail.com> сообщил/сообщила в новостях следующее: news:O1*************@TK2MSFTNGP15.phx.gbl... When you say you can't delete, what do you mean? For instance, have you written the commands and the fields aren't deleting, do you need help writing the commands, or are you looking for the GUI tools to work and they aren't? If you can tell me a little more abou tyour situation, I can be of more help (I hope ;-P) "Adriano" <ad*****@mail.ru> wrote in message news:OG*************@TK2MSFTNGP14.phx.gbl... Hello,
I have a DBF table, connection is okay, can select necessary records and fill into dataset, but can't delete and update them, can anyone please help me on how to do this/
thanks in advance, Adriano
Hello Ken,
I tryied without ' ', many other combinations, no result((((
anyone please help me....
Adriano
"Ken Tucker [MVP]" <vb***@bellsouth.net> сообщил/сообщила в новостях
следующее: news:OA**************@TK2MSFTNGP09.phx.gbl... Hi,
Dont put the tablename in ' '
cmd.CommandText = "DELETE FROM 310705 WHERE SAN = '25107'"
Ken --------------
"Adriano" <ad*****@mail.ru> wrote in message news:uB**************@TK2MSFTNGP10.phx.gbl... Hello Ryan,
thanks for your reply, I'm not looking for GUI tools for deleting, I just want my vb.net DELETE query to work. When I execute the following query: cmd.CommandText = "DELETE FROM `310705` WHERE SAN = '25107'
there's no error message, it seems okay but actually rows containing SAN = '25107' is not removed. SELECT and INSERT statements work fine.
I have ODBC connection and dataadapter.
Regards, Adriano
"W.G. Ryan eMVP" <Wi*********@gmail.com> сообщил/сообщила в новостях следующее: news:O1*************@TK2MSFTNGP15.phx.gbl... When you say you can't delete, what do you mean? For instance, have you written the commands and the fields aren't deleting, do you need help writing the commands, or are you looking for the GUI tools to work and they aren't? If you can tell me a little more abou tyour situation, I can be of more help (I hope ;-P) "Adriano" <ad*****@mail.ru> wrote in message news:OG*************@TK2MSFTNGP14.phx.gbl... Hello,
I have a DBF table, connection is okay, can select necessary records and fill into dataset, but can't delete and update them, can anyone please help me on how to do this/
thanks in advance, Adriano
try this
cmd.CommandText = "DELETE FROM [310705] WHERE SAN = '25107'"
if SAN is a numeric fiield the syntax is like this
cmd.CommandText = "DELETE FROM [310705] WHERE SAN = 25107"
regards
Michel Posseth [MCP]
"Adriano" <ad*****@mail.ru> wrote in message
news:Om***************@TK2MSFTNGP12.phx.gbl... Hello Ken,
I tryied without ' ', many other combinations, no result((((
anyone please help me....
Adriano
"Ken Tucker [MVP]" <vb***@bellsouth.net> сообщил/сообщила в новостях следующее: news:OA**************@TK2MSFTNGP09.phx.gbl... Hi,
Dont put the tablename in ' '
cmd.CommandText = "DELETE FROM 310705 WHERE SAN = '25107'"
Ken --------------
"Adriano" <ad*****@mail.ru> wrote in message news:uB**************@TK2MSFTNGP10.phx.gbl... Hello Ryan,
thanks for your reply, I'm not looking for GUI tools for deleting, I just want my vb.net DELETE query to work. When I execute the following query: cmd.CommandText = "DELETE FROM `310705` WHERE SAN = '25107'
there's no error message, it seems okay but actually rows containing SAN = '25107' is not removed. SELECT and INSERT statements work fine.
I have ODBC connection and dataadapter.
Regards, Adriano
"W.G. Ryan eMVP" <Wi*********@gmail.com> сообщил/сообщила в новостях следующее: news:O1*************@TK2MSFTNGP15.phx.gbl... When you say you can't delete, what do you mean? For instance, have you written the commands and the fields aren't deleting, do you need help writing the commands, or are you looking for the GUI tools to work and they aren't? If you can tell me a little more abou tyour situation, I can be of more help (I hope ;-P) "Adriano" <ad*****@mail.ru> wrote in message news:OG*************@TK2MSFTNGP14.phx.gbl... > Hello, > > I have a DBF table, connection is okay, can select necessary records > and fill into dataset, > but can't delete and update them, can anyone please help me on how to > do this/ > > thanks in advance, > Adriano >
No result((((((
Any other ideas???
thanks in advance
Adriano
"m.posseth" <mi*****@nohausystems.nl> сообщил/сообщила в новостях следующее:
news:eE**************@TK2MSFTNGP09.phx.gbl... try this
cmd.CommandText = "DELETE FROM [310705] WHERE SAN = '25107'"
if SAN is a numeric fiield the syntax is like this
cmd.CommandText = "DELETE FROM [310705] WHERE SAN = 25107"
regards
Michel Posseth [MCP]
"Adriano" <ad*****@mail.ru> wrote in message news:Om***************@TK2MSFTNGP12.phx.gbl... Hello Ken,
I tryied without ' ', many other combinations, no result((((
anyone please help me....
Adriano
"Ken Tucker [MVP]" <vb***@bellsouth.net> сообщил/сообщила в новостях следующее: news:OA**************@TK2MSFTNGP09.phx.gbl... Hi,
Dont put the tablename in ' '
cmd.CommandText = "DELETE FROM 310705 WHERE SAN = '25107'"
Ken --------------
"Adriano" <ad*****@mail.ru> wrote in message news:uB**************@TK2MSFTNGP10.phx.gbl... Hello Ryan,
thanks for your reply, I'm not looking for GUI tools for deleting, I just want my vb.net DELETE query to work. When I execute the following query: cmd.CommandText = "DELETE FROM `310705` WHERE SAN = '25107'
there's no error message, it seems okay but actually rows containing SAN = '25107' is not removed. SELECT and INSERT statements work fine.
I have ODBC connection and dataadapter.
Regards, Adriano
"W.G. Ryan eMVP" <Wi*********@gmail.com> сообщил/сообщила в новостях следующее: news:O1*************@TK2MSFTNGP15.phx.gbl... > When you say you can't delete, what do you mean? For instance, have > you written the commands and the fields aren't deleting, do you need > help writing the commands, or are you looking for the GUI tools to > work and they aren't? If you can tell me a little more abou tyour > situation, I can be of more help (I hope ;-P) > "Adriano" <ad*****@mail.ru> wrote in message > news:OG*************@TK2MSFTNGP14.phx.gbl... >> Hello, >> >> I have a DBF table, connection is okay, can select necessary records >> and fill into dataset, >> but can't delete and update them, can anyone please help me on how to >> do this/ >> >> thanks in advance, >> Adriano >> > >
Hi Adriano,
When you say the rows are not removed, what do you mean? In FoxPro DBFs when
a record is deleted it is only flagged as deleted and not physically removed
from the table until the table is Packed. Packing requires exclusive use of
the table and if done at all is usually performed as part of off-hours
housekeeping routines.
For what it's worth, names of Fox tables do not usually begin with numeric
values, but rather with alpha characters or underscores. However, in my test
in VFP9 I was able to create a table with a name like yours and delete
records successfully both with Delete From 123 and Delete From "123".
--
Cindy Winegarden MSCD, Microsoft Visual FoxPro MVP ci**************@msn.com www.cindywinegarden.com
"Adriano" <ad*****@mail.ru> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl... cmd.CommandText = "DELETE FROM `310705` WHERE SAN = '25107'
there's no error message, it seems okay but actually rows containing SAN = '25107' is not removed. ......
Hello Cindy,
thanks for your reply,
Yes, I mean they're not physically deleted after executing query, I'd
appreciate your help if you send me some code on how to do Packing.
I've attached my DBF file in case you'll need it,
Best regards,
Adriano
"Cindy Winegarden" <ci**************@msn.com> сообщил/сообщила в новостях
следующее: news:ey**************@TK2MSFTNGP12.phx.gbl... Hi Adriano,
When you say the rows are not removed, what do you mean? In FoxPro DBFs when a record is deleted it is only flagged as deleted and not physically removed from the table until the table is Packed. Packing requires exclusive use of the table and if done at all is usually performed as part of off-hours housekeeping routines.
For what it's worth, names of Fox tables do not usually begin with numeric values, but rather with alpha characters or underscores. However, in my test in VFP9 I was able to create a table with a name like yours and delete records successfully both with Delete From 123 and Delete From "123".
-- Cindy Winegarden MSCD, Microsoft Visual FoxPro MVP ci**************@msn.com www.cindywinegarden.com
"Adriano" <ad*****@mail.ru> wrote in message news:uB**************@TK2MSFTNGP10.phx.gbl...
cmd.CommandText = "DELETE FROM `310705` WHERE SAN = '25107'
there's no error message, it seems okay but actually rows containing SAN = '25107' is not removed. ......
Hi Adriano,
Why do you think you need to pack the tables? Most Fox developers run with
Set Deleted On and only pack the tables when doing some sort of
weekly/monthly maintenance. Also, packing tables requires exclusive access
and so it can't be done every time a record is deleted.
'-- VB.NET code to pack a table:
'-- Download and install the latest VFP OLE DB data provider from
'-- http://msdn.microsoft.com/vfoxpro/do.../default.*aspx
Imports System
Imports System.Data.OleDb
Module Module1
Sub Main()
Try
Dim cn As OleDbConnection = New OleDbConnection( _
"Provider=VFPOLEDB.1;Data Source=C:\Temp\;")
Dim cmd As OleDbCommand = New OleDbCommand( _
"Set Exclusive On; Pack Test.dbf", cn)
cn.Open()
cmd.ExecuteNonQuery()
cn.Close()
Catch e As Exception
MsgBox("Exception")
End Try
End Sub
End Module
--
Cindy Winegarden MSCD, Microsoft Visual FoxPro MVP ci**************@msn.com www.cindywinegarden.com
"Adriano" <ad*****@mail.ru> wrote in message
news:OW**************@TK2MSFTNGP10.phx.gbl... Hello Cindy,
thanks for your reply, Yes, I mean they're not physically deleted after executing query, I'd appreciate your help if you send me some code on how to do Packing.
Aha ,, he was using the Fox :-)
Cindy ,, did you made a mistake in your footer ?? or is this a title i do
not know yet "MSCD" should have been MCSD i guess ( Microsoft Certified
Solution`s Developer ) :-)
regards
Michel Posseth [MCP]
"Cindy Winegarden" <ci**************@msn.com> wrote in message
news:Ol****************@TK2MSFTNGP09.phx.gbl... Hi Adriano,
Why do you think you need to pack the tables? Most Fox developers run with Set Deleted On and only pack the tables when doing some sort of weekly/monthly maintenance. Also, packing tables requires exclusive access and so it can't be done every time a record is deleted.
'-- VB.NET code to pack a table: '-- Download and install the latest VFP OLE DB data provider from '-- http://msdn.microsoft.com/vfoxpro/do.../default.*aspx
Imports System Imports System.Data.OleDb Module Module1 Sub Main() Try Dim cn As OleDbConnection = New OleDbConnection( _ "Provider=VFPOLEDB.1;Data Source=C:\Temp\;")
Dim cmd As OleDbCommand = New OleDbCommand( _ "Set Exclusive On; Pack Test.dbf", cn)
cn.Open() cmd.ExecuteNonQuery() cn.Close()
Catch e As Exception MsgBox("Exception") End Try
End Sub End Module
-- Cindy Winegarden MSCD, Microsoft Visual FoxPro MVP ci**************@msn.com www.cindywinegarden.com
"Adriano" <ad*****@mail.ru> wrote in message news:OW**************@TK2MSFTNGP10.phx.gbl... Hello Cindy,
thanks for your reply, Yes, I mean they're not physically deleted after executing query, I'd appreciate your help if you send me some code on how to do Packing.
Thanks Michel. Some days I just can't type.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP ci**************@msn.com www.cindywinegarden.com
"m.posseth" <mi*****@nohausystems.nl> wrote in message
news:e7****************@TK2MSFTNGP10.phx.gbl... Cindy ,, did you made a mistake in your footer ??
"Adriano" <ad*****@mail.ru> wrote in message
news:ed**************@TK2MSFTNGP15.phx.gbl... No result((((((
Any other ideas???
Do you need a COMMIT statement? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mark |
last post by:
This question refers to a main form with a continuous form subform.
After an error occurs after entering several records in the subform, how can I
delete all the data in the main form and all the...
|
by: Nathan Bloom |
last post by:
Hi,
I have a data entry form (access 2000) that also allows the user to add,
update, and delete records from the form. The Delete action is carried out
in an event procedure and has the...
|
by: uv |
last post by:
Hi!
I'm having problems submitting a new record through the form.
I'm working with the wizard and I've added a control button to my form
for entering entering a new record but for some reason it...
|
by: Mike Turco |
last post by:
I'm working on an application that imports and exports tons of CSV data,
like 64,000 records per file, and six or seven files in a set.
First off, by the tine I import a few hundred thousand...
|
by: Coy Howe |
last post by:
This one seems bizarre!
We have a database consisting of a main table and 12 - 15 "sub" tables,
which are connected via cascading relationships. The database performs
many complex calculations...
|
by: KC |
last post by:
Hello,
I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB.
I have tweaked this DB to work for our small co. It has worked pretty
well up until I made the mistake of deleting...
|
by: Mojtaba Faridzad |
last post by:
Hi,
with SetDataBinding( ) a DataGrid shows a DataView. user can select some
rows in the grid by holding cotrol key. when user clicks on Delete button, I
should delete all selected rows. I am...
|
by: azmiza |
last post by:
Hi everybody,
I need your help.
I want to view my sql database and its work very well which is display in my web browser
but once I want to press button yes, its not working, I check the...
|
by: shriil |
last post by:
Hi
I have this database that calculates and stores the incentive amount
earned by employees of a particular department. Each record is
entered
by entering the Date, Shift (morn, eve, or night)...
|
by: padmaneha |
last post by:
Hi
I have created two tables 'TrainsMaster' & 'TransArrvlDepinfo'
Columns which I have created in 'TrainsMaster' are 'trainName,TrainNo, StartStaionId, & EndstationId'
Columns which I...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |