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 Chriss Miller 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. dsanchez2

    Returning a value from a stored proc..

    Change the Procedure to a Function. For example: FUNCTION NewBatch ( Dt IN VARCHAR2, glbRegion IN VARCHAR2, glbUser IN VARCHAR2, cBillSys IN VARCHAR2, strPromoCodes IN VARCHAR2, BatchID IN VARCHAR2...
  2. dsanchez2

    How to run Oracle SQL statement in C program?

    You could also use ORACLE's OCI (Oracle's Call Interface). This is an API into Oracle. This library provides a set of routines to execute SQL Statements and retrive the result sets. The ProC pre-processor generates calls to these routines. This library is provided with Oracle.
  3. dsanchez2

    Getting the underlying user

    This is incorrect. The only thing that Oracle requires is that only users belonging to a given Unix group (by default "dba") can obtain "SYSDBA" privilage. And this is only a requirement if Operating System authentication is being used.
  4. dsanchez2

    oracle on unix versus oracle on windows

    I also prefer Unix, but Oracle was not originally written for Unix. The first version of Oracle, released in 1979, was written for the PDP-11 under RSX. It also run on the VAX/VMS under PDP-11 emulation mode. By 1983 it was re-written in C and released under VAX/VMS and soon after on Unix. By...
  5. dsanchez2

    How to empty a file?

    > if you have an open filehandle on "file-to-clean" and you move another file "over" it, what happens to the filehandle? On Unix systems nothing will happen to the file handle. It will still point to the original file. However, the directory entry will now be pointing to a new file. So any...
  6. dsanchez2

    SQL question

    Try the following: select c.cust_id,i.inv,p.prod from customer c, (select cust_id,count(*) inv from invoice group by cust_id) i, (select cust_id,count(*) prod from product group by cust_id) p where c.cust_id = i.cust_id and c.cust_id = p.cust_id
  7. dsanchez2

    Question about use of structs

    You will need to use a self-referential structure. Something similar to the following; #include <stdlib.h> struct linklist { char field1[21]; int field2; struct linklist *next; }; struct linklist *head; struct linklist *tail; main() { struct linklist *p; head = (struct linklist...
  8. dsanchez2

    How to store binary chars into string value?

    You should not use strcat. This only works for strings. That is it will stop coping when it finds a null (\0). Your function should look as follows: void LNPUBLIC PrintItemString(char *pText, WORD iText, unsigned char *mess ) { long int nChars = 0; /* How many characters have been...
  9. dsanchez2

    File handling with c

    You will need to do the following; (1) Open text file for reading. (2) Create a new file (3) Copy from file (1) to file (2) excluding the line that contains the string to you want to excluded. You can use the "strstr" function to check whether the line includes the string. (4) Rename the file...
  10. dsanchez2

    Howto: Open multiple files with different handles

    Your declaration will be something like the following: struct handles { FILE *fp; char path[256]; }; struct handles handle_list[100]; Or typedef struct { FILE *fp; char path[256]; } HANDLE; HANDLE handle_list[100]; To use it, try...
  11. dsanchez2

    timeouts

    $ uname -a; time rsh 192.192.1.1 OSF1 ift-11.local V4.0 878 alpha 192.192.1.1: Connection timed out real 1m15.18s user 0m0.00s sys 0m0.01s
  12. dsanchez2

    How to find length of a file?

    On Linux (or UNIX) try: #include <sys/stat.h> main() { struct stat buf; if (stat("filename",&buf) != -1) printf("Size: %d\n",buf.st_size); else printf("---ERROR---\n"); } The stat call returns information about the given file into the structure "buf". On of the fields in this...
  13. dsanchez2

    How could I open a C program from PL/SQL code?

    You should be able to do this by a "External Subprogram". This facility allows you to call routines written in another language, such as C. So you could write a C function that invokes your program, and call this function from PL/SQL. See the "Oracle9i Application Developer's Guide -...
  14. dsanchez2

    root password file

    Unix does not maintain "clear" passwords. They are always store in an encrypted/hashed form. The first thing the system does when you enter a password (to loging) is encrypt the password that you entered, and use this encrypted version to check the password. So the answer to your questions is...
  15. dsanchez2

    Calling an Oracle Stored Procedure in JAVA

    The parameter to getFloat is the index to the parameter. In your case it would be: changeFromPreviousMonth = cstmt.getFloat(1); Since it is the first parameter. (Note the returned value is counted as a parameter). When counting the parameters to determine the index you must include the IN...
  16. dsanchez2

    Global Temporary Tables and Crystal

    It sounds like some type of connection polling is been used by Crystal Report. See if there is a way of turning this off, so that report instance connects to its own session.
  17. dsanchez2

    Dynamic Table Name in a Cursor

    Partions could be the solution to your requirements. Partions let you breaklarge tables into smaller and more manageable pieces. Each partion can be manipulated individually (eg. dropping or adding a partition). However, SQL queries and DML statements do not need to be modified in order to...
  18. dsanchez2

    JDBC execution on several tablespaces

    In Oracle access to tables is not controlled by "tablespaces", it is controlled by "schemas" (i.e. users). To access a table from another schema/user you must prefix the schema name. For example: xxx.mytable Alternative, you can create SYNONYM for these tables. Also the owner of the tables...
  19. dsanchez2

    ORA-00984 :Column Not Allowed Here

    Show us your CREATE statement.

Part and Inventory Search

Back
Top