|
1. What is the starting Index value? How to locate it? It is tab control to place our controls with in the form in multiple sheets. Index starts with 1. And to identify If Tabstrip1.SelectedItem. Index = 1 Then .. End if 2. Where will we give the option explicit keyword and for what? In the general declarations section. To trap undeclared variables. 3. What is the max size allowed for Extension in Visual Basic? Frm, bas, cls, res, vbx, ocx, frx, vbp, exe 4. How to increase the Date corresponding with month,date,year? DateSerial(year(Now),Month(Now)+1,1) Hour, min, sec, month, year, DateSerial, dateadd, datediff, weekday, datevalue, timeserial,timevalue. 5. What is Mask Edit and why it is used? Control. Restricted data input as well as formatted data output. 6. What methods are used for DBGrid in unbound mode? AddData, EditData, Readdata, WriteData. 7. what will be the result for 15/4 and 154 ? 15/4 = 3.75 and 154 = 3 8. What two methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful? SetComplete and SetAbort. 9. What are the ADO objects? Provide a scenario using three of them to return data from a database. Expected answer: Connection Connects to a data source; contains the Errors collectionCommand Executes commands to the data source. Is the only object that can accept parameters for a stored procedure.Recordset The set of data returned from the database.Scenario: There are many possibilities. The most likely is as follows:Dim conn As ADODB.ConnectionDim rs As ADODB.RecordsetDim Cmd As ADODB.Commandconn.ConnectionString = ?CONNECTION STRING?conn.OpenSet Cmd.ActiveConnection = connCmd.CommandText = ?SQL STATEMENT?Set rs = Cmd.ExecuteSet rs.ActiveConnection = Nothingconn.Close 10. Dim x, y as integer. What is x and y data type? X as variant and y as integer.
|