Re: reading longvarchar(484), data always empty in Excel Options



On Oct 23, 11:39 pm, Sonnich Jensen <sonnich.jen...@xxxxxxxxxxxxxxxxx>
wrote:
I have a problem with reading data from Oracle in Excel. When reading
a
longvarchar, I get nothing - it does not read any data out.
The code (VBA in Excel) below is in use, and when reading a normal
varchar2 field it
works. The current is a longvarchar(484), and it is always empty,
causing EOF to be true - always - trying to to read data before reads
nothing...
The SQL works well in PHP, DB Explorer and such.... but M$ does not
like it,

Help, please...

Set oWS = CreateWorkspace("server", "me", "qwerty", dbUseODBC)
oWS.DefaultCursorDriver = dbUseODBCCursor
oWS.LoginTimeout = 280

Set Connection = oWS.OpenConnection("server", dbDriverNoPrompt,
True, _
"ODBC;DSN=datastuff;UID=me;PWD=qwerty")
Connection.QueryTimeout = 480

sSQL = "select something from whatever"
Set oRec = oConn.OpenRecordset(sSQL, dbOpenDynaset)

If oRec.EOF Then '<- always false, even that SQL returns data
sResult = ""

What, exactly, is a 'longvarchar(484)'? That isn't a valid datatype
in Oracle.


David Fitzjarrell

.



Relevant Pages

  • Re: Exporting/Editing Risks
    ... I do have a basic SQL and VBA knowledge; however, ... > 2) Create a view in the Project database that shows all risks and includes ... > 3) in any version of Excel read the view into a sheet. ...
    (microsoft.public.project)
  • Re: Use MS Query in VBA to only get a SQL statement
    ... Excel macro keeps running while the query grid is showing, ... how you would capture the sql. ... > Access database under VBA control, where you could bring up a new ...
    (microsoft.public.excel.programming)
  • Re: Excel VBA - MS Query
    ... I just muddle through VBA and SQL on a "must do" basis. ... I bring data from Access into an Excel worksheet for statisitcal ...
    (microsoft.public.office.developer.vba)
  • Re: Handling Empty Strings in Query
    ... I tried the Nzfunction and the SQL worked great when I ran it from ... but failed when I ran the VBA (from Excel). ... Where do I find the field property to allow nulls? ...
    (microsoft.public.access.queries)
  • VBA usign predefined SQL over SQL server database
    ... New Database Query) from Excel VBA ... I need to run the query from the macro attached to a button in Excel as I ... do I have to define the SQL etc from scratch in VBA? ...
    (microsoft.public.excel.programming)