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 Mike Lewis 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. john0532

    passing file path to old win9x app

    the path is generated and saved in a CString several hundred lines previous to where i call GetShortPathName(). It would take a major effort to dig it out. I think I'm just going to copy the file to C:\TEMP and pass the old app that path. Dou you think GetShortPathName() can handle a blank in...
  2. john0532

    passing file path to old win9x app

    the path is: c:\documents and settings\jms0532\my documents\O2548
  3. john0532

    passing file path to old win9x app

    I tried GetShortPathName() and got an error 123 which means The filename, directory name, or volume label syntax is incorrect. It looks like there is no way around the space in the file path being unacceptable.
  4. john0532

    passing file path to old win9x app

    I'm trying to send the file path c:\documents and settings\<username>\my documents\<filename> to an old COTS application that will not accept blanks in the path. Does anybody have any ideas on how this could be done? The DOCUMENTS AND SETTINGS portion can be changed to DOCUME~1 but what can I...
  5. john0532

    text color in dialog box

    How do I change the color of a static text control in a dialog box? Thanks
  6. john0532

    CTime, COleDateTime and milliseconds

    I'm looking for a way to save milliseconds in a SQL Server database datetime field. CTime doesn't handle milliseconds as far as I know and I haven't been able to find a way to do it with COleDateTime either. Can I add the milliseconds in a SYSTEMTIME to COleDateTime? Do I need to change...
  7. john0532

    Adding dates

    I tried your query and it worked correct for me, too. I went back to the Enterprise manager and looked at the fields there. I stripped off the 1900-01-01 from TestTime to make it the same as what I'm working with and ran your query again and got 1899-12-30 01:29:00.000 instead of...
  8. john0532

    Adding dates

    I've got 2 date/time fields I want to combine/add and put in another date/time field in another table. Here's an example of the 2 fields: [arrivetime] [WaitingPeriod] 9/16/2002 11:49:49 PM 1:29:00 AM Logically if you add them you would get: 9/17/2002 1:18:49 AM But I'm getting...
  9. john0532

    fails in SP, works in Query Analyzer

    I made a stupid mistake. In the step of the scheduled job where I tell it to execute the stored procedure I mispelled the stored procedure name. Sorry to waste your time.
  10. john0532

    fails in SP, works in Query Analyzer

    I don't get an error and nothing is inserted in the table. But the insert is performed when I run the same code with the query analyzer
  11. john0532

    fails in SP, works in Query Analyzer

    I got an insert statement that works fine in the QA but when I put it in a Stored Procedure it doesn't work. I don't use Transact-SQL very much so I figure I'm missing something. Any tips would be appreciated. Here's the code: CREATE PROCEDURE [dbo].[migrate_data] AS declare @days int declare...
  12. john0532

    Assertion failure CStringArray

    It's line 222 of afxcoll.inl: _AFXCOLL_INLINE void CStringArray::SetAt(int nIndex, const CString& newElement) { ASSERT(nIndex >= 0 && nIndex < m_nSize); m_pData[nIndex] = newElement; } I put a break point in the calling function: int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE...
  13. john0532

    Assertion failure CStringArray

    Here is a more complete set of the code which is about 400 lines of code below where it steps into InitInstance(). The value of i is 5. i = rsShimShop.GetRecordCount() + 1; m_siteArray.RemoveAll(); m_siteArray.SetSize(i, 250); m_siteArray.SetAt(0, &quot; &quot;)...
  14. john0532

    Assertion failure CStringArray

    As soon as it steps to the first line in InitInstance() (called by AfxWinMain()) I get the assertion failure. BOOL CGapPlusApp::InitInstance() { TCHAR buf[512], LFbuf[512], DSNbuf[512], DBNamebuf[512], Userbuf[512]; Thanks for responding.
  15. john0532

    Assertion failure CStringArray

    With a wizard I put a CStringArray within the application class &quot;theApp&quot;. When I start the debugger I get the assertion failure before my code touches the CStringArray (as far as I know). Here's the assertion failure: Debug Assertion Failed! Program:...\GapPlus.exe File: afxcoll.inl...
  16. john0532

    INSERT INTO only appears to work

    It doesn't recognize it as failing to do the insert. @@error is still 0 so that doesn't catch it. This select statement from the sp grabs the new record number successfully: select @newrecnum=[job id] from [testspcopyjob] where site = @asite and model = @model and shop = @shop and cc...
  17. john0532

    INSERT INTO only appears to work

    When using the T-SQL debugger the sp appears to be working, returning the new record number from a SELECT statement. However 98% of the time the Enterprise Manager shows no new records in the table. It's the fact that it works occasionally that has me stumped. The Profiler says the sp is...
  18. john0532

    How do I convert text to integer?

    Thanks again. Your statement &quot;returns it as an integer&quot; answered my question
  19. john0532

    How do I convert text to integer?

    Great. Now how do I put the numerical value into a variable of type int?
  20. john0532

    How do I convert text to integer?

    I'm new to Transact-SQL. I've got a number in a varchar field that I need to get the numeric value of. How do I go about this? Thanks

Part and Inventory Search

Back
Top