Should I convert all SQL to queries? (1 Viewer)

Keith Nichols

Registered User.
Local time
Tomorrow, 01:09
Joined
Jan 27, 2006
Messages
431
Hi Guys,

The application I developed was a couple of steps ahead of my knowledge all the way. As I climbed the learning curve (many thanks to all those kind souls who "Sherpa'd" me along the way) I came to realize that many things had been done the hard way.

Much of the nonsense has been removed but the remaining issue is SQL vs Queries. In a thread I can't recall now, it was suggested that the SQL littered throughout my database could cause problems down the track.

To start, the database works. I am developing release 2 as we speak, but none of the problems with R1 were SQL related.

Secondly, All my tables have the relationships pretty well defined. And here is confusion No.1. When I created tables that had linked information, I would use SQL to show that information in a combo box on data sheet view. This seems to be a duplication of the relationship that is defined in the relationship window, but it works. However, nobody is supposed to use the tables to do anything in the database, it all happens through forms.

All my forms are now based on queries. So, I add a field, such as a combo box, to a form and these have SQL to select the relevant data, sort and filter it etc. A duplication of the duplication?

And a similar situation exists with sub forms, reports etc.

I haven't quantified this, but there are dozens and dozens of these SQL snippets littered about. Most are small beer but a few are rather complex.

So here is the rub, if I convert every snippet of SQL to a query, I might end up with something like 100 queries. With the database window interface as it is, I think this would be unmanageable and would quickly lead to orphan queries. Let alone the horror of trying to name all of them.

It would be easier, and nicer perhaps, if there were some sort of tree view/directory type structure that could group items so that, say, all the queries related to the main dialog form came under a heading with a minimize/maximizes button. But I digress.

Is there any merit in converting the SQL?

Would I see any advantage?

Have I misunderstood something?

It is late at night in Arabia, I have a few coldies on board, and so I must apologize, to any that have got this far, for the ramble. If there are cogent thoughts on the subject, I would be grateful to hear them.

Regards,

Keith.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:09
Joined
Feb 19, 2002
Messages
43,213
Hi Keith,
I lived in Kuwait for a while but it was long before the first Gulf War. I sure did like swimming in the warm gulf waters. Since western women would be stoned if they showed up in town in a bathing suit, even a modest one, we used to head down south to the neutral zone and just take some camel track to the beach.

Anyway, if you are not experiencing bloating problems or slowness there isn't any need to redo all your SQL. Stored querydefs are more efficient but the time is probably not measurable.
 

KenHigg

Registered User
Local time
Today, 18:09
Joined
Jun 9, 2004
Messages
13,327
What about from a portability perspective? I was under the impression that upsize wizards convert queries into views... Would there be issues if you tried to execute a Access syntax sql statement against an attached sql server table?
 

Keith Nichols

Registered User.
Local time
Tomorrow, 01:09
Joined
Jan 27, 2006
Messages
431
KenHigg said:
What about from a portability perspective? I was under the impression that upsize wizards convert queries into views... Would there be issues if you tried to execute a Access syntax sql statement against an attached sql server table?

Ken,

It sounds like a real potential problem but I aint never gong to upsize this baby. If it gets that big, and I doubt it will, the multibillion dollar company I work for (a national oil company, not listed anywhere) would absorb thefunctionality into SAP.

This is not my preffered option as the department loses control and things become very rigid once codified into sap and ISO9000 or whatever. This is currently just a management/user tool to keep information flowing within a department albeit, in excess of 150 persons.

Regards,

Keith.
 

Keith Nichols

Registered User.
Local time
Tomorrow, 01:09
Joined
Jan 27, 2006
Messages
431
Pat Hartman said:
Hi Keith,
I lived in Kuwait for a while but it was long before the first Gulf War. I sure did like swimming in the warm gulf waters. Since western women would be stoned if they showed up in town in a bathing suit, even a modest one, we used to head down south to the neutral zone and just take some camel track to the beach.

Anyway, if you are not experiencing bloating problems or slowness there isn't any need to redo all your SQL. Stored querydefs are more efficient but the time is probably not measurable.

Hi Pat,

Thanks for the reassuarance. I suspected that there wasn't a problem but have learnt ot check my instincts against wiser council.

Qatar is somewhat more relxed than Kuwait although I can't account for the time difference between our residencies. No stoning in Qatar of women or anyone. I haven't met a single Kuwati, but they are reputed to be (by western expats at least) to be the most arrogant and difficult of the Gulf Arabs.

Trffic her eis hell nd so we don't venture out that much but with 3 under 3, who needs to?!.
Regards,
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:09
Joined
Feb 19, 2002
Messages
43,213
I was under the impression that upsize wizards convert queries into views...
This would only happen if you also convert the app to an .adp which MS is phasing out so I wouldn't recommend creating any new ones.
 

Users who are viewing this thread

Top Bottom