Article ID: 186103
Article Last Modified on 6/23/2005
Sqlhandle=sqlconnect("Oracle_Server")
=Sqlexec(Sqlhandle,"Insert into person(P_id,lastname,firstname) ;
values (PersonSN.nextval,'Lastname','Firstname')")Oracle Server -------------
** Create a Sequence name "PersonSN"
CREATE SEQUENCE PersonSN
INCREMENT BY 1
START WITH 100001
NOCACHE;
** Create a Server Function "FNext" to return the next sequence from
** Person.
CREATE OR REPLACE FUNCTION FNext RETURN NUMBER
IS
Count1 NUMBER(10,2);
BEGIN
SELECT PersonSN.nextval INTO Count1
FROM dual;
RETURN(Count1);
END;
/Visual FoxPro -------------
=SQLEXEC(Sqlhandle,"Select FNext from dual")
Additional query words: VFoxWin kbDSupport KBDSE
Keywords: kbhowto KB186103