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. RichardF

    Grant problems with Roles

    ok, i found out why. From Oracle documentation on CREATE VIEW: Prerequisites To create a view in your own schema, you must have the CREATE VIEW system privilege. To create a view in another user's schema, you must have the CREATE ANY VIEW system privilege. To create a subview, you must have...
  2. RichardF

    Grant problems with Roles

    Hi, This doesn't make sense to me. Scratch does not need the right to select from admin01 because, if you look at the code, it is scratch who is trying to create the view in admin01 (and there are no tables in admin01 to select from). Additionally scratch already has the SELECT ANY TABLE priv...
  3. RichardF

    Grant problems with Roles

    Hi, Could anyone explain what is going on here. Many thanks, Rich. connect sys/pass as sysdba create role admin_role; grant insert any table to admin_role; grant select any table to admin_role; grant execute any procedure to admin_role; create user admin01 identified by password; grant...
  4. RichardF

    Default Value not firing when using a View/Trigger

    Hi, I got a bit of a problem with this one. Below is a small sample of the replicated problem (because the real tables have many more columns). CREATE TABLE abc ( IDENT VARCHAR2(100) NOT NULL PRIMARY KEY, CREATION DATE DEFAULT SYSDATE NOT NULL ); / CREATE OR REPLACE VIEW abc_v (IDENT...
  5. RichardF

    Adding a foreign key constraint to USER_TABLES

    Hi, ALTER TABLE TABLE1 ADD ( CONSTRAINT FK_TABLENAME FOREIGN KEY (TABLENAME) REFERENCES USER_TABLES(TABLE_NAME) ); This gives me insufficient privileges - but I thought User_tables was a user accessible table. Is it possible to do this ? Rich. Programmers are tools for converting...
  6. RichardF

    COM Exe server in C#'

    I discovered there is a way of using a C# class library (a .net dll) through COM interop and have successfully written client applications in c++. However is there a way to create an exe class library ? Thanks in advance. Rich. Programmers are tools for converting caffeine into code
  7. RichardF

    Shared Singleton across DLLs

    Hi, You can use #pragma data_seg in your DLL to share the same instance of the singleton. Note that this will also share the same data across all applications that use the Dll. You can google on #pragma data_seg. Hope this helps. Rich. Programmers are tools for converting caffeine into code
  8. RichardF

    STL: remove_copy_if in a Class

    Hi, I was happy that I found a STL way to copy elements using a functional condition : bool FileNotExists(string Filename) { return (FileExists(Filename.c_str()) == FALSE); } int main() { vector<string> filenames; filenames.push_back( string("C:\\File1.txt") ); filenames.push_back(...
  9. RichardF

    Annoying Delay in Explorer

    Hi, Thanks for your replies ! Indexing Service was turned off, so I have turned it back on - I dont know if this will affect the performance. I have also run chkdsk /f which seems to have fixed the problem (accessing the same directories is near instant or < 1 sec at least). I will monitor...
  10. RichardF

    Annoying Delay in Explorer

    Hi, I am getting a problem when using Windows Explorer : When I browse to a directory there is a delay (approx 30 seconds) before the contents of the directory show. During this time the explorer window goes into Not responding. It happens quite often but seems to frequent on folders that I...
  11. RichardF

    Confused == operator

    Hi, Ok I understand that the two pointers are being compared. What I dont understand is why .... bool result_2 = (MyStr("hello") == MyStr("hello")); Why does MyStr("hello") call into operator const char*() and not operator == (MyStr& ) Regards, Rich
  12. RichardF

    Confused == operator

    Pop quiz: class MyStr { public: MyStr(const char* newValue):s(newValue) { } operator const char*() { return s.c_str(); } bool operator == (MyStr& rhs) { return rhs.s == s; } private: std::string s; }; int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE...
  13. RichardF

    Run-Time Check Failure #2 - Stack around the variable was corrupted

    Hi, int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { char cPath[MAX_PATH]; ZeroMemory(cPath,MAX_PATH); GetModuleFileName(NULL,cPath,MAX_PATH); // cPath =...
  14. RichardF

    Multiple Dialogs, but closing one closes them all

    Hi, My app may open several instances of the same form. However closing the first form ( this is the one with the [STAThread], Application.Run etc ) then all instances of that form close at the same time. Is there a way round this ? Thanks Rich.
  15. RichardF

    ExistsInList template function

    Hi, The function was declared in stdafx.h, but the body was defined in stdafx.cpp. Moving the body to the .h fixed the problem. Thanks! Rich. Programmers are tools for converting caffeine into code
  16. RichardF

    ExistsInList template function

    Hi, I am getting link error messages on the following function. VC7. Any ideas ? Thanks in Advance. Rich. template<class T> bool ExistsInList(T Value, T Expr, ...) { // NOTE: list terminates with -1 va_list Argp; T chk = Expr; va_start(Argp,Expr); while (chk != Value) if (-1 ==...
  17. RichardF

    Assignment or Equality

    Unfortunately, that didnt work. Also if Option Strict is On then you also get a compile msg : Option Strict On disallows implicit conversions from 'Boolean' to 'Integer'. Best i could come up with is : If iKeyID.Parse(InputBox("Enter Key ID")) > 0 Then Stop End...
  18. RichardF

    Assignment or Equality

    [smile]
  19. RichardF

    Assignment or Equality

    Thanks for your responses. Chiph: I agree, although it doesnt apply in this particular situation (due to the simplicity of the statement), it would most certainly be useful in more complex situations. And some would argue it improves readability. Coming from a C++ background i personally...
  20. RichardF

    Assignment or Equality

    If (iKeyId = CInt(InputBox("Enter Key ID"))) Then Stop End If iKeyId = CInt(InputBox("Enter Key ID")) If iKeyId Then In the first one iKeyID will always be 0. I believe this is because VB thinks i want to do compare and not assign. Does anyone know a way...

Part and Inventory Search

Back
Top