June 20, 2000


Question: I am trying to upgrade a program from DAO to ADO that will take a flat file and create a new database, add the needed fields and then populate the database. Does ADO have “CreateDatabase” funtionality? ie.Set DAODBase=dbEngine.CreateDatabase_ (App.Path & “” & sDatabaseName)Set TDef = DAODBase.CreateTableDef _ (sTableDef) Answer:

Writing a Query Showing ID Status

Question: I am a SQL beginner and I am trying to write this query. I have a table with four columns: ID STATUS DESCRIPTION CURRDATE1 open Test1 6/1/001 open Test1 6/2/001 close Test1 6/3/002 open Test2 6/2/002 open Test2 6/4/003 open Test3 6/4/00 I would like to show only the

Grouping By One Field When Selecting Several

Question: These are the fields of my table: id, email, firstname, and lastname. There can be multiple records for a single email. I only want to group by email and get a count of how many records have the same email for each group. The fields I need for the

Selecting with Distinct

Question: I am trying to query a database with the following: SELECT DISTINCT SystemName, OwnerID, Location, Productver, StartDate, EndDate, ProjectNameFROM DevicesORDER BY SystemName I only want to have the DISTINCT affect the values for ‘SystemName’; I don’t care what the values for the other variable are. In other words, I

Mobile E-mail and Automobile E-mail Trend

Question: I’ve heard that Nokia’s strategic aim is to make sure that every automobile on earth has its own e-mail address by 2010. Have you heard that too? Answer: I’ve also heard mention that Nokia is taking this direction. The wireless Internet has been called the “second revolution” and I

Binding a Grid to a Cursor

Question: Is it possible to have a grid bound to a cursor? If so please tell me how. Answer: A grid is bound to a cursor the same way that a grid is bound to a table. You set the RecordSourceType of the grid to Alias and then set the

Problem with Multiple Table Joins

Question: I have two tables Region(RegionId-PK, RegionName) and District(DistrictId-PK, DistrictName, RegionId-FK). When I open a recordset (rs) like : Dim rs as new ADODB.Recordsetrs.Open “SELECT District.*, Region.RegionName FROM District INNER JOIN Region ON District.RegionId = RegionId”, cn Now, with this recordset, it gives an “Insufficient key column information…” message on

Passing a Parameter to a Stored Procedure

Question: How do you pass a parameter to a stored procedure from within another stored procedure? Answer: To call a stored procedure from inside another stored procedure, let’s take an example of a procedure that returns information for all the tables in a database or for a single table. The

Handling Multiselect Lists

When using a select list that will allow multiple selections, the selections will be provided to you in the Request object as a comma-separated list. Using the new Split function, you can break this list into an easily handled array by using the following code: Dim a_strSelected() ‘ As Array

No more posts to show