Re: Motif and esql
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Mike Segel wrote: > > TELI: CHRISTOPHER wrote: > > > > Hi > > is it possible to combine motif and esql. > > I need to create a form for modifying a certain values, the regualr form in > > isql > > is considered to be a little tough for the use. I was wondering if there > > were any pitfalls i should know before i start. > > thanx, > > Yes, you can. Pitfalls? You betcha. It comes when you want to > debug your code. > > Your esql/c code sits in .ec files and is preprocessed to .c > then compiled. Your esql/c code is commented out and is replaced > with function calls. > > What works is creating your software in layers. From your > motif layer call your dbfunctions. Then in a separate module > group your database calls. > > This layers the visual interface in one section of code and your > database connectivity in another. The benifits? > > 1) Parallel development. You can write your interface code, test it > and debug it independent of your database calls. > Same for your database code. > 2) Lowers the cost of maintenance. Your motif guru isn't kept busy > looking at database code. > > 3) Allows you some database independence. If you switch databases, you > don't have a lot of code to hunt and fix. Just change the lower > level routines. > > Does this make sense, or am I drunk yet again? > > -Mikey I don't think you're drunk. Those are certainly good ideas whether the debugger gives you problems or not, as you've pointed out. The debugger problem seems to be an ESQL/C problem, I can't see that Motif has anything to do with it (maybe I'm missing the point). I've developed several Motif forms using ESQL/C. So far I've never had a problem with my debugger (cvd on an SGI). I just load the .ec file and step through it the same as a .c file. The only problem is that I haven't found a way to look at the sqlca struct. Maybe I'm just spoiled with a good debugger. Ross