April 7, 1999

Retrieving database table names using SQL

Question: I’m a database administrator for a medium-sized company. I would like to be able to retrieve the names of the tables within the company’s database using SQL so that I could do some administration remotely. Is there a way to do so? I believe that there is a system

General Programming

Question: I want to create a function that will calculate four values. I want to return these four values as an array back to an array in the main procedure. Is this possible, or should I create four different functions? Answer: VB6 allows a function to return an array. End


Question: select issuelog.analysts,issuelog.helpdesk,isssuelog.issue.issuelog.customer.issuelog.status.issuelog.logged,issuelog.date FROM issuelogWHERE(((issuelog.date)like “*24/01/99*”))ORDER BY issuelog.helpdesk; How do I get it to search for a series of dates, such as the 24th, 25th, 26th etc., in one query? Answer: To search for a range, you simply use “BETWEEN.” For example: select …whereissuelog.date between ’24/01/99′ and ’27/01/99′

Creating menu items in a running program

Question: Is it possible for a running program to dynamically create/add a menu or add a specific item to an existing menu based on an action by the program user? Answer: It sure is! Using the menu editor, create a menu array by assigning a numeric value to the index

SQL Statement

Question: I have a statement: “Select * from table order by price DESC” but I want only the top 50 price products, not all the list ordered by price. How do I do that? Answer: If you are using SQL Server, version 7 allows you to use the “Top” keyword,

Slow view with lots of calculations

Question: I created a view that does a lot of calculations and references several tables. If I do a select * from linkview everything comes up instantaneosly. However, if I do a select * from linkview where id=’12345′ it is mind numbingly slow. Which makes it seem that the problem

Table Name Substitution with a variable

Question: I have data that is broken into multiple tables depending on the month. For example: 99jan table99feb table These tables are all built the same and are very large (each one has 500,000 rows). I am writing a simple interactive script that prompts you “From what month do you

SQL 6.5 or 7.0 Identity Problem

Question: I want to use replication between two SQL servers in which I used Identity properties in some tables. How can I preserve data integrity and maintain my application functionality on both servers, knowing that data syncronization must be done with dual direction? Answer: If I understand you correctly, you

Execution parameter

Question: I want to run my VB5 app with different parameters, for example, like this: c:Myapp.exe -C to run in a mode I want to call “config-mode.” Is this possible with VB5? Answer: It sure is! The Command function returns the argument portion of the command line. So in your

No more posts to show