Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gavinhuet

    Applicaton role with ADODC

    If memory serves me, the ADODC has a connection string as a property and will use that connection string to connect to the database and then execute the query and make the results available. This would mean that all queries would have to be 2 part: first to set the application role; second to do...
  2. gavinhuet

    Excel Automation closing the process

    I recently had to do some c# Excel integration and came across a few of these issues too. I have found that if there are any excel objects which have not been set to NULL, the Excel instance will remain. So if you have declared an application and workbook object and not set it both to NULL, the...
  3. gavinhuet

    Program_name in sysprocesses

    The only way I know to get the application name into SQL is as part of the connection string, and certainly that is what Books Online and MSDN tell you about the application name. You say you have to use a defined ODBC driver, when you specify this driver is there no option to add additional...
  4. gavinhuet

    Program_name in sysprocesses

    If I remember correctly you can specify the application name as part of the connection string, I cannot remeber the syntax but a quick search on connection strings will produce an answer. -- Gavin
  5. gavinhuet

    Getting the Computer Name from T-SQL

    Look at the SQL function HOST_NAME()... SELECT HOST_NAME() -- gavin
  6. gavinhuet

    returning multiple records sets from a stored procedure?

    TJRTech, I agree with what you are saying. And like you I am confused by that particular line alluding to stored procedures. I have looked at both from sql profiler and they both look as though they are executed at once with all the results returned to ADO, however the documentation says that...
  7. gavinhuet

    returning multiple records sets from a stored procedure?

    OK, this has been bugging me for a couple of days now. Let us take the case of the following SQL statement SELECT * FROM table1;SELECT * FROM table2 As I said earlier I believed that using ADO's NextRecordset would mean that each statement is only executed when the NextRecordset function is...
  8. gavinhuet

    returning multiple records sets from a stored procedure?

    Not sure if that is one round trip or 3... I remember reading some time ago (i.e. years) that when NextRecordset is called the next statement to return a recordset is executed, and not when the original call is done. You may need to double check the ADO documentation regarding this.
  9. gavinhuet

    Stopping SQL Replication Agents

    Stop Replication: You will need to replace the [LogReaderName] and [DistributionName] with the correct string values for your environment. EXEC msdb.dbo.sp_stop_job @job_name = [LogReaderName] EXEC msdb.dbo.sp_stop_job @job_name = [DistributionName]
  10. gavinhuet

    Determining modal at runtime?

    I am glad it has worked for you. In my application I just check my main MDI form because as I said in the original post, if your form is in a modal state the style is set on all the forms within your application. -- Gavin
  11. gavinhuet

    Determining modal at runtime?

    You could use API's to determine whether your application is in a modal state, either by having a modal form open or by having a message box active. When the application is made modal all forms have the disabled style set so you could check any open form in your application. Private Const...
  12. gavinhuet

    Is there any way of speeding up Queries that use LIKE clauses ?

    In the past I have found that when confronted by a nasty LIKE or IN (subselect) query, they can be optimised by first doing the LIKE/IN query and putting the results in a temproray table. You can the use the temporary table in an inner join (depending on your data) and this will usually be...
  13. gavinhuet

    Here's a API function the Disables the Close button.

    Just a small note to remember about doing this: just because the close menu is disabled does not mean that a user cannot close the form down without clicking on some special button or link. If you press ALT+F4 the form will still close down, you will need to trap for this in the form KeyDown...
  14. gavinhuet

    ROUNDING TIME EXPRESSION??

    Try this, you could put it in a function which accepts the time input and return the time to the next 15 minutes... DECLARE @myDate SMALLDATETIME SET @myDate = '12 march 2004 12:46' SET @myDate = DATEADD(MINUTE, (DATEPART(MINUTE, @myDate) + 14) / 15 * 15 - DATEPART(MINUTE,@myDate), @myDate)...
  15. gavinhuet

    Problem with Excel (Not visible and not closing).

    Hi, Your problem is this statement: Dim XLApp As New Excel.Application Because you have chosen to auto-instantiate the excel object, every call to it will reinstantiate the object, therefore the lines xlApp.Quit Set xlApp = Nothing will not work. What you need to do is instantiate and use...
  16. gavinhuet

    How can I tell if Excel is Installed?

    Try somthing along these lines: Dim bExcelInstalled As Boolean Dim myXL As Object On Error Resume Next Set myXL = CreateObject("Excel.Application") On Error Goto ErrorHandler If (myXL Is Nothing) Then bExcelInstalled = False Else bExcelInstalled =...
  17. gavinhuet

    How can I make SQL Query Analyzer as my Registered Application

    Muhammad, See my relpy in the "Visual Basic(Microsoft) -VB.NET" forum - no need to have so many cross-posts... thread796-766440 Gavin
  18. gavinhuet

    VSS: How can I make SQL Query Analyser as my registered application

    Muhammad, On my system I needed to changed my INI file on the VSS server, and restart VSS. -- Gavin
  19. gavinhuet

    How can I make SQL Query Analyzer as my Registered Application

    Hiya, In your SourceSafe ini file there will be some entries which you can edit to force SourceSafe to open the files up with certain applications. Look for something like this: .reg (Win) = notepad.exe .vbp (Win) = notepad.exe .vcp (Win) = notepad.exe .mak (Win) = notepad.exe .bat (Win) =...
  20. gavinhuet

    VSS: How can I make SQL Query Analyser as my registered application

    Hiya, In your SourceSafe ini file there will be some entries which you can edit to force SourceSafe to open the files up with certain applications. Look for something like this: .reg (Win) = notepad.exe .vbp (Win) = notepad.exe .vcp (Win) = notepad.exe .mak (Win) = notepad.exe .bat (Win) =...

Part and Inventory Search

Back
Top