Ned@France Posted November 9, 2016 Report Share Posted November 9, 2016 Hello Everebody I debuted programming on a SM70 and i encounter a problem in understanding of Search Function in DataBase. Would you an example to search a valu on database for a return to the screen. Thank you in advance Ned..... Quote Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted November 10, 2016 MVP 2023 Report Share Posted November 10, 2016 Data tables are not really a database, but you can search for a value in a column. Look in the Help on "Data Table Find" Joe T. Quote Link to comment Share on other sites More sharing options...
Ravi Posted February 25 Report Share Posted February 25 On 11/10/2016 at 9:18 PM, Joe Tauser said: Data tables are not really a database, but you can search for a value in a column. Look in the Help on "Data Table Find" Joe T. Dear Joe, Can I get a Sample coding for Data Table find in Visi Logic. My requirement is as follows. I get Invoice number from Scanner. I should search for this number either Exists in Data Table or Not. If record does not exists in Data table then I should proceed further operation The DataTable is as attached The Invoice number Stored in Column 2 ,and it is unique Please send me Sample Vlp File to My email ID/Whatsup "anravindranatha@yahoo.com",My whatsup no is +91-9945323817 else i should reject the operation Quote Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted February 25 MVP 2023 Report Share Posted February 25 On 11/10/2016 at 9:48 AM, Joe Tauser said: Look in the Help on "Data Table Find" 4 hours ago, Ravi said: Can I get a Sample coding for Data Table find in Visi Logic. Did you review the Help entry as Joe suggested? It is very clear and performing the action you need is very simple. Please keep in mind that this is a user forum staffed by volunteers with actual full time jobs. This is not official Unitronics Support. Quote Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted February 25 MVP 2023 Report Share Posted February 25 @Ravi - I generally don't write programs from scratch for people on the forum. My philosophy has always been you learn by doing. That said, I will generally help a user who's made an honest stab at making a program work by editing it for them. If you upload the program you're working on I and others on the forum will be happy to download it and have a look at your work. Make sure you tell us which version of Visilogic you're using. Joe T. 1 Quote Link to comment Share on other sites More sharing options...
Ravi Posted February 26 Report Share Posted February 26 5 hours ago, Joe Tauser said: @Ravi - I generally don't write programs from scratch for people on the forum. My philosophy has always been you learn by doing. That said, I will generally help a user who's made an honest stab at making a program work by editing it for them. If you upload the program you're working on I and others on the forum will be happy to download it and have a look at your work. Make sure you tell us which version of Visilogic you're using. Joe T. Dear Joe Here is the code Written for above Logic written to Find row containing Invoice Number which Already exists in DataTable or not Ex If ML10 = contains Invoice No=40625 ML9 and ML8 Should retrun the no How many times it occured in Data Table that is 0 for No Row contains 40625 ,1 For 1 Row Contains but i am Getting Some other number may be 3 or 4 and some times 0 if it exists request your help to diagnose the cause test with herculs_R1.vlp Quote Link to comment Share on other sites More sharing options...
Gabriel Franco Posted February 26 Report Share Posted February 26 Some considerations: 1. You are skipping row 0. First Data tables row is 0. In your case, limits must be 0 ... 299. 2. ML9 returns the FIRST row where the InvoiceNO is found, or returns -1 if not found; not the number of times InvoideNO is present in the DB. 3. You don´t need to use find extended FB. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.