Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Creating a Form for Master Updates

$
0
0

I am just foraying into Visual Studio project development: please excuse my VERY basic question.

I have been successful in interfacing our Foxpro tables with SQL 2012 Express 64 bit: I can copy table structures into SQL 2012, I can populate the tables with FoxPro data, and I can extract from SQL into FoxPro tables thru small Fox routines.

I am now getting down to maintaining the primary masters of my application. When I am ready, I will block the master updates in Fox, and use the SQLtoFox routine to get the latest version of the masters for the legacy Fox applications.

I would be thrilled if someone could take the time to give me a walkthrough for the following :

I have a table STATEMST in my database (the simplest)

Fields:

STATE1 CHAR(40) as PRIMARY KEY

ROADPERMIT

LST_PERC decimal(8,2)

I am creating a form which accepts a text value entered in  TEXTBOX1

This has to be checked if it exists in (SELECT STATE1 DISTINCT FROM STATEMST)

IF it exists: to display ROADPERMIT and LST_PERC for editing

if not, to present three textbox controls for entry.

Finally, an UPDATE button to update the statemast with UPDATE if there was only a EDIT, and INSERT into STATEMST if a new record.

If I can get past this, I will have learnt all I need to to start the first menus and forms for my application. I have not been successful in inserting the SQL query into VBASIC: SELECT has a different meaning there.

Thanks in advance!!

Mohan


MohanSQL


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>