Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Hong kong

    Unanswered: Connection Begintrans

    Dear all,

    I am using VB to connect to Oracle Database
    I have three questions:
    (1) Sql Statement is :
    select [field1], [field2] from table1 where [field1]='ABC' order by [field1]

    The backet cannot work. It is big problem for me as the SQL statement is generated by the program and it need "" symbol for oracle. Any solutions:

    Sql="select " & "[" & text1 & "] , [ " & text2 & " ] from table1.


    set cm.activeconnection=cn ' cn is anther connection
    cm.commandtype= adcmdtype
    cm.commandtext=CSQL ' csql is sql statement


    cm(0)="VarType" ' it prompt the error

    the error is "set parameter info has not been executed"

    (3) connectionname.begintrans

    prompt the error.
    I think whether the connection has been created or the connection string parameter problem???
    What is your view? Please help/.

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    >It is big problem for me as the SQL statement is generated
    >by the program and it need "" symbol for oracle
    SQL does NOT use or want double quote marks as shown above.
    SQL can require single quote marks.
    Where SQL wants/expects single quote marks I concatentate into the string CHR(39); such as ...
    v_where_clause := 'WHERE P_KEY = ' || CHR(39) || 'ABC' || CHR(39);
    After this statement execute v_where_clause contains:

    HTH & YMMV

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts