JuliaDatabases / ODBC.jl

An ODBC interface for the Julia programming language
https://odbc.juliadatabases.org/stable
Other
106 stars 62 forks source link

ODBC in Julia Studio on Windows #19

Closed rogerjbos closed 11 years ago

rogerjbos commented 11 years ago

I am trying to use ODBC within Julia Studio on windows and it is not working as the documentation suggests. I don't know if its a problem with Julia, Julia Studio, or ODBC, but just wanted to ask somewhere. Here is what I have tried:

julia> ODBC.connect("xfdr",usr="xfl",pwd="xfl") ODBC not defined

julia> co = connect("xfdr",usr="xfl",pwd="xfl") unsupported or misplaced expression keywords

julia> advancedconnect() advancedconnect not defined

quinnj commented 11 years ago

I think you need to call

using ODBC

first. This loads the ODBC module code into your environment. This also depends on ODBC being installed, which can be done through the package manager.

Pkg.add("ODBC")
rogerjbos commented 11 years ago

Here is what I have tried in that regard:

julia> Pkg.init() Package directory C:\Users\bosr\AppData\Roaming\julia\packages already exists.

julia> Pkg.add("ODBC")

julia> WARNING: You've already required VersionSet("ODBC",[]), ignoring.

julia> using ODBC could not open file C:\julia_home\ODBC.jl

julia>

Maybe there is something else wrong.julia> cygwin warning: MS-DOS style path detected: METADATA\FITSIO\versions Preferred POSIX equivalent is: METADATA/FITSIO/versions CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: METADATA\FactCheck\versions Preferred POSIX equivalent is: METADATA/FactCheck/versions CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: METADATA\FastaRead\versions Preferred POSIX equivalent is: METADATA/FastaRead/versions CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: METADATA\FileFind\versions Preferred POSIX equivalent is: METADATA/FileFind/versions CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: METADATA\FunctionalCollections\versions Preferred POSIX equivalent is: METADATA/FunctionalCollections/versions CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: METADATA\FunctionalUtils\versions Preferred POSIX equivalent is: METADATA/FunctionalUtils/versions CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames cygwin warning: MS-DOS style path detected: METADATA\GARCH\versions Preferred POSIX equivalent is: METADATA/GARCH/versions CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames Should I be getting all these errors when I try to load the ODBC package:

quinnj commented 11 years ago

Hmmmm.....it looks like something is getting messed up between JuliaStudio and your julia packages directory. I'm also not sure what the CYGWIN error is about. Do you have a cygwin environment setup on your computer? If so, it may be trying to call a cygwin binary for your .exe instead of the windows console (replacing the COMSPEC environment variable).

A solution to get ODBC working is to find the ODBC source directory (if it's a regular windows install, then it should be C:/Users/username/AppData/Roaming/julia/packages/ODBC/src/ODBC.jl) then run

include("C:/Users/username/AppData/Roaming/julia/packages/ODBC/src/ODBC.jl")
using ODBC

This will load the ODBC source directly and then using ODBC will refer to the already loaded code instead of trying to go out and find it.

rogerjbos commented 11 years ago

Thanks again for your reply and your ODBC package! Julia Studio is not loading the package to that location (i.e.

C:\Users\bosr\AppData\Roaming\julia\packages has no ODBC folder). I will look into that. Thanks again.

quinnj commented 11 years ago

Weird. If you do a search in your C drive for ODBC, does the folder come up anywhere? Yeah, this sounds like JuliaStudio is messing up the package install path for some reason.

An even more manual to get this to work, if you're comfortable with git, is navigate to the directory where you'd like the ODBC package and run

git clone https://github.com/karbarcca/ODBC.jl ODBC

You can then run pretty much the same command as above (include the ODBC.jl file, then using ODBC).

Sorry for all the hassle, it's a bummer that JuliaStudio seems to be messing things up here. I personally don't use it (I actually manage the Sublime-Julia repo as well and use Sublime Text with this plugin as my main work environment. Feel free to check it out if you'd like to try something else).

-Jacob

rogerjbos commented 11 years ago

Jacob,

As you suggested, I used git clone and now have my ODBC folder. The first time I run "using ODBC" I get an error, but if I run it a second time, it doesn't give an error. Now ODBC.connect() tells me there is a Pipe(open), but query() returns an error.

BTW I am getting the same results with Julia command line as with Julia Studio.

julia> using ODBC ERROR: DataFrames not found in require at loading.jl:46 at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\ODBC.jl:3

julia> ODBC.connect("xfdr") Pipe(open, 0 bytes waiting)

julia> query("select top 10 * from roger_production") ERROR: query not defined

julia>

julia> using ODBC

julia> ODBC.connect("xfdr") Pipe(open, 0 bytes waiting)

julia> query("select top 10 * from roger_production") ERROR: query not defined

julia>

quinnj commented 11 years ago

Uh.....I'm afraid I opened a can of worms for you. The problem here is that the ODBC package has dependencies and without git cloning each one manually, you won't be able to load the ODBC code (hence why we're supposed to have a working Pkg manager to handle all this!).

In that case, here are my recommendations of things to try/do:

  1. Try to get the package manager working again by deleting your julia package directory (C:/Users/username/AppData/julia). Just delete the "julia" folder and then open back up your Julia and run Pkg.init() again. This pretty much always solves the problem for me.
  2. If the above doesn't work, I'd file an issue with the [JuliaStudio]() folks (haha.....I was just looking up the link and saw that you already opened an issue, nice job!)
  3. It's really not too bad to get all the dependencies manually, again if you're comfortable with git. Dependencies: git clone https://github.com/HarlanH/DataFrames.jl git clone https://github.com/karbarcca/Datetime.jl git clone https://github.com/timholy/ProgressMeter.jl git clone https://github.com/nolta/UTF16.jl

You then just have to run the same inlcude() & using package incantation for each package to load the code. And finally, ODBC should work!

rogerjbos commented 11 years ago

Jacob,

Thanks for continuing to try to help me. I deleted the julia folder and re-ran Pkg.init() and it looked a lot better. I now have all the correct folders in the packages folder. However, I still get an error when I run "using ODBC" and query(). I didn't see UTF16 get created, so I used "git clone" to get it manually. Here is the output:

julia> Pkg.init() cygwin warning: MS-DOS style path detected: C:\Users Preferred POSIX equivalent is: /cygdrive/c/Users CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl

julia> Pkg.add("ODBC") INFO: Cloning cache of Blocks from git://github.com/tanmaykm/Blocks.jl.git INFO: Cloning cache of Datetime from git://github.com/karbarcca/Datetime.jl.git INFO: Cloning cache of GZip from git://github.com/kmsquire/GZip.jl.git INFO: Cloning cache of ODBC from git://github.com/karbarcca/ODBC.jl.git INFO: Cloning cache of DataFrames from git://github.com/JuliaStats/DataFrames.jl .git INFO: Cloning cache of ProgressMeter from git://github.com/timholy/ProgressMeter .jl.git INFO: Cloning cache of Stats from git://github.com/JuliaStats/Stats.jl.git INFO: Installing Blocks v0.0.0 INFO: Installing Datetime v0.0.0 INFO: Installing GZip v0.2.4 INFO: Installing ODBC v0.2.0 INFO: Installing DataFrames v0.3.11 INFO: Installing ProgressMeter v0.0.0 INFO: Installing Stats v0.2.6 INFO: REQUIRE updated.

julia> using ODBC ERROR: syntax: missing separator in tuple in include at boot.jl:238 in include_from_node1 at loading.jl:96 in include at boot.jl:238 in include_from_node1 at loading.jl:96 in reload_path at loading.jl:121WARNING: backtraces on your platform are often misleading or partially incorrect

at C:\Users\bosr\AppData\Roaming\julia\packages\Blocks\src\mapreduce.jl:50 at C:\Users\bosr\AppData\Roaming\julia\packages\Blocks\src\Blocks.jl:20 at C:\Users\bosr\AppData\Roaming\julia\packages\DataFrames\src\dataframe_blocks. jl:1 at C:\Users\bosr\AppData\Roaming\julia\packages\DataFrames\src\DataFrames.jl:255

at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\ODBC.jl:3

julia> connect("xfdr") Pipe(open, 0 bytes waiting)

julia> query("select top 10 * from roger_production") ERROR: query not defined

julia>

rogerjbos commented 11 years ago

I have both 64-bit Julia 0.2.0 installed and 32-bit Julia Studio. Do you think that would cause a problem? Are any of the packages platform specific? I would guess not since they seem to be written in julia, but just thought I would ask.

quinnj commented 11 years ago

Hmmm.......this seems to be an incompatibility with the Blocks package that DataFrames is using. My guess is that the JuliaStudio version of julia is too old for the Blocks.jl package since it's brand spanking new.

If you go into your packages directory and enter the DataFrames folder, then the src folder, open up the DataFrames.jl file. Then go down to line 255, and comment it out, so the resulting line should look like:

#include("dataframe_blocks.jl")

I confirmed that this works on mine (doesn't break the rest of DataFrames).

quinnj commented 11 years ago

Yeah, the problem is that JuliaStudio uses it's own version of julia and not any other version that you may have installed, so you're stuck with their version if it's old. (Another reason I prefer Sublime-Julia).

rogerjbos commented 11 years ago

I will take a look at Subline. In the meantime, I am doing this in Julia 0.2.0 (not Julia Studio). Nevertheless, I did comment out line 255 and now I don't get an error when I run "using ODBC", but query() still returns an error.

julia> using ODBC

julia> connect("xfdr") Pipe(open, 0 bytes waiting)

julia> query("select top 10 * from roger_production") ERROR: [ODBC]: A valid connection was not specified (and no valid default connec tion exists) in query at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\userfacing.jl :42WARNING: backtraces on your platform are often misleading or partially incorrect

julia> co = connect("xfdr") Pipe(open, 0 bytes waiting)

julia> query(co, "select top 10 * from roger_production") ERROR: no method query(Pipe,ASCIIString)

julia>

quinnj commented 11 years ago

As the documentation notes, you have to use ODBC.connect(), explicitly referencing the module name. In the case above, you're calling Base.connect which deals with opening/connecting pipes and sockets.

rogerjbos commented 11 years ago

We are getting very close now. It shows 1 successful connection, but backend.jl is saying invalid Array Dimensions:

julia> using ODBC

julia> xfdr = ODBC.connect("xfdr",usr="xfl",pwd="xfl") Connection 1 to xfdr successful. julia> query(xfdr, "select * from roger_intraday") ERROR: no method query(Nothing,ASCIIString)WARNING: backtraces on your platform are often misleading or partially incorrect

julia>

julia> query("select * from roger_intraday") ERROR: invalid Array dimensions in ODBCFetch at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:89

julia> query("select * from roger_production") ERROR: invalid Array dimensions in ODBCFetch at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:89

julia>

quinnj commented 11 years ago

Ah, I'm glad this came up. I've been meaning to push my fix for a few days and just forgot. This error was related to SQL unicode text strings and SQL Date types not being allocated correctly. I just pushed a new fix, so if you run Pkg.update(), you should see the fix.

rogerjbos commented 11 years ago

I tried your suggestion, but its still a no go on my end:

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating cache of ODBC... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: Upgrading ODBC: v0.2.0 => v0.2.1

julia> using ODBC

julia> ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000537d030 Statement pointer: Ptr{Void} @0x000000000d31f790 Contains resultset? No

julia> query("select top 10 * from roger_production") ERROR: invalid Array dimensions in ODBCFetch at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:89 in ODBCMetadata at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backen d.jl:72WARNING: backtraces on your platform are often misleading or partially incorrect

julia> query("select * from roger_intraday") ERROR: invalid Array dimensions in ODBCFetch at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:89 in ODBCMetadata at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backen d.jl:72

julia>

quinnj commented 11 years ago

Drat. Could you run the same querystring with the querymeta() function instead of query? Post the results here and I'll try to debug.

rogerjbos commented 11 years ago

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000a5c75a0 Statement pointer: Ptr{Void} @0x000000000777b7c0 Contains resultset? No

julia> querymeta("select * from roger_intraday")

Resultset metadata for executed query

Columns: 5 Rows: -1 Column Names: ["Strategy","Absolute","Relative","Detail","datadate"] Column Types: [("SQL_VARCHAR",12),("SQL_FLOAT",6),("SQL_FLOAT",6),("SQL_VARCHAR" ,12),("SQL_VARCHAR",12)] Column Sizes: [255,53,53,255,255] Column Digits: [0,0,0,0,0] Column Nullable: [1,1,1,1,1] Query: select * from roger_intraday

quinnj commented 11 years ago

Interesting. The rows returned are -1; do you know what the deal is there? Are there actual rows or is the query supposed to return none? What DBMS is the data source? It may be the case that the DBMS doesn't support the rows, which would be lame, but I think I remember reading somewhere that older DBMS do just that.

rogerjbos commented 11 years ago

Jacob,

I saw the rows=-1, but I didn’t know if it meant anything. I have a sample of the query below from R. My db is SQL Server 2008 R2, which is a fairly recent version.

Thanks,

Roger

sqlQuery(xf, "select top 10 * from roger_production") datadate model gvkey rank score 1 2013-06-10 SCG 122519 0.976 0.2702 2 2013-06-10 SCG 179586 0.242 -0.0895 3 2013-06-10 SCG 14898 0.029 -0.3349 4 2013-06-10 SCG 65021 0.447 -0.0156 5 2013-06-10 SCG 179288 0.919 0.1743 6 2013-06-10 SCG 21542 0.834 0.1188 7 2013-06-10 SCG 1004 0.938 0.1979 8 2013-06-10 SCG 1076 0.367 -0.0432 9 2013-06-10 SCG 24888 0.513 0.0037 10 2013-06-10 SCG 13619 0.424 -0.0228

From: Jacob Quinn [mailto:notifications@github.com] Sent: Friday, September 06, 2013 3:44 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Interesting. The rows returned are -1; do you know what the deal is there? Are there actual rows or is the query supposed to return none? What DBMS is the data source? It may be the case that the DBMS doesn't support the rows, which would be lame, but I think I remember reading somewhere that older DBMS do just that.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23964447.

quinnj commented 11 years ago

Ok. I think this should do it. I changed the rowset allocation to be 1 if the result is anything < 0. If you run Pkg.update() again, let me know if this fixes it.

rogerjbos commented 11 years ago

Didn’t seem to produce any difference:

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating cache of ODBC... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: Upgrading ODBC: v0.2.1- => v0.2.1

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000c19f7e0 Statement pointer: Ptr{Void} @0x0000000004b4c990 Contains resultset? No

julia> query("select * from roger_intraday") ERROR: invalid Array dimensions in nullstrip at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:239WARNING: backtraces on your platform are often misleading or partially incorrect

julia> querymeta("select * from roger_intraday")

Resultset metadata for executed query

Columns: 5 Rows: -1 Column Names: ["Strategy","Absolute","Relative","Detail","datadate"] Column Types: [("SQL_VARCHAR",12),("SQL_FLOAT",6),("SQL_FLOAT",6),("SQL_VARCHAR" ,12),("SQL_VARCHAR",12)] Column Sizes: [255,53,53,255,255] Column Digits: [0,0,0,0,0] Column Nullable: [1,1,1,1,1] Query: select * from roger_intraday

julia> querymeta("select * from roger_production")

Resultset metadata for executed query

Columns: 5 Rows: -1 Column Names: ["datadate","model","gvkey","rank","score"] Column Types: [("SQL_TYPE_TIMESTAMP",93),("SQL_VARCHAR",12),("SQL_VARCHAR",12),( "SQL_FLOAT",6),("SQL_FLOAT",6)] Column Sizes: [23,255,6,53,53] Column Digits: [3,0,0,0,0] Column Nullable: [0,0,0,1,1] Query: select * from roger_production

julia> query("select * from roger_production") ERROR: invalid Array dimensions in nullstrip at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:239

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Friday, September 06, 2013 3:54 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Ok. I think this should do it. I changed the rowset allocation to be 1 if the result is anything < 0. If you run Pkg.update() again, let me know if this fixes it.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23965052.

quinnj commented 11 years ago

Ok, hopefully the 3rd time's the charm. Try another Pkg.update() and let me know how it goes.

rogerjbos commented 11 years ago

No, sorry. I don’t think I was meant to use julia. Do you think my Pkg.update worked, because it’s still showing Rows: -1.

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating cache of ODBC... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: Upgrading ODBC: v0.2.1- => v0.2.1

julia> using ODBC

julia> query("select * from roger_production") ERROR: invalid Array dimensions in nullstrip at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:239

julia> querymeta("select * from roger_production")

Resultset metadata for executed query

Columns: 5 Rows: -1 Column Names: ["datadate","model","gvkey","rank","score"] Column Types: [("SQL_TYPE_TIMESTAMP",93),("SQL_VARCHAR",12),("SQL_VARCHAR",12),( "SQL_FLOAT",6),("SQL_FLOAT",6)] Column Sizes: [23,255,6,53,53] Column Digits: [3,0,0,0,0] Column Nullable: [0,0,0,1,1] Query: select * from roger_production

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Friday, September 06, 2013 4:12 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Ok, hopefully the 3rd time's the charm. Try another Pkg.update() and let me know how it goes.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23966060.

quinnj commented 11 years ago

Hmmm.......this is puzzling. If you run Pkg.checkout("ODBC"), what does it print? We need to simplify the debugging process here without having to push everything to the package system. Pkg.checkout should try to keep your ODBC package current with whatever I push to the github repo (If I understand it correctly, though I currently can't get it to work for me. I just posted in the forum about it). That way, I can actually push some debugging prints in the code for you to run and get a better idea of what's really going on.

rogerjbos commented 11 years ago

I am on the train now. I feel like I have used up too much of your time already. If you really want to debug this should we continue tonight or wait until Monday morning?

Roger J. Bos, CFA Rothschild Asset Management, Inc. Tel +1 (212) 403 5471 e-mail: roger.bos@rothschild.com 1251 Avenue of the Americas, New York, NY 10020

From: Jacob Quinn [mailto:notifications@github.com] Sent: Friday, September 06, 2013 04:42 PM Eastern Standard Time To: karbarcca/ODBC.jl ODBC.jl@noreply.github.com Cc: rogerjbos roger.bos@gmail.com Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm.......this is puzzling. If you run Pkg.checkout("ODBC"), what does it print? We need to simplify the debugging process here without having to push everything to the package system. Pkg.checkout should try to keep your ODBC package current with whatever I push to the github repo (If I understand it correctly, though I currently can't get it to work for me. I just posted in the forum about it). That way, I can actually push some debugging prints in the code for you to run and get a better idea of what's really going on.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23967884.

rogerjbos commented 11 years ago

Jacob,

I ran the code again this morning and now I get partial results. I get 1 row, probably because the Rows: was changed from -1 to 1. I also show the output of Pkg.checkout()

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000f52f860 Statement pointer: Ptr{Void} @0x000000000ce9b9b0 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: Cloning cache of UTF16 from git://github.com/nolta/UTF16.jl.git INFO: Installing UTF16 v0.2.0

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Friday, September 06, 2013 4:43 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm.......this is puzzling. If you run Pkg.checkout("ODBC"), what does it print? We need to simplify the debugging process here without having to push everything to the package system. Pkg.checkout should try to keep your ODBC package current with whatever I push to the github repo (If I understand it correctly, though I currently can't get it to work for me. I just posted in the forum about it). That way, I can actually push some debugging prints in the code for you to run and get a better idea of what's really going on.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23967884.

quinnj commented 11 years ago

Glad to hear you're at least seeing some kind of result. And no worries on the problem, I'm actually glad you have a reproducible case because the times I got this error, I was usually in the middle of work and just tweaked my query until it returned. Though I think my case was always related to the new Date functionality and this it turns out is unrelated.

Ok, so I just pushed something to test to master, so if you run Pkg.update() again (now that you've set up ODBC to track master) it should pull this in. I'm not positive it'll actually work, but I added some debug functionality, so when you can a chance to run it, I'd appreciate hearing what is printed. I think I understand the issue now, so I think this should be a working solution once we get any bugs ironed out. Thanks for your help with this.

-Jacob

On Sep 7, 2013 8:49 AM, "rogerjbos" notifications@github.com wrote:

Jacob,

I ran the code again this morning and now I get partial results. I get 1 row, probably because the Rows: was changed from -1 to 1. I also show the output of Pkg.checkout()

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000f52f860 Statement pointer: Ptr{Void} @0x000000000ce9b9b0 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: Cloning cache of UTF16 from git://github.com/nolta/UTF16.jl.git INFO: Installing UTF16 v0.2.0

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Friday, September 06, 2013 4:43 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm.......this is puzzling. If you run Pkg.checkout("ODBC"), what does it print? We need to simplify the debugging process here without having to push everything to the package system. Pkg.checkout should try to keep your ODBC package current with whatever I push to the github repo (If I understand it correctly, though I currently can't get it to work for me. I just posted in the forum about it). That way, I can actually push some debugging prints in the code for you to run and get a better idea of what's really going on.

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23967884>.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23993635 .

rogerjbos commented 11 years ago

Jacob,

Output is the same. When I update it says, “No packages to install, update or remove.” I tried modifying the query a little bit but I still only get 1 row.

I am working on getting sublime up and running. When sublime is working for me, will I be able to run code sections like I can in R, or in Julia do I have to run the whole file? Julia Studio only has an option to run the whole file (as far as I can tell so far). When I was learning Python I was using PyScripter and it also only sent the whole file for execution. I like being able to run small pieces of code.

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Updating ODBC... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 2 Connection pointer: Ptr{Void} @0x000000000f52fbf0 Statement pointer: Ptr{Void} @0x000000000cd1e400 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> query("select top 5 * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> query("select Strategy, Absolute from roger_intraday") 1x2 DataFrame: Strategy Absolute [1,] "SC" 1.6358

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: No packages to install, update or remove.

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Saturday, September 07, 2013 11:10 AM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Glad to hear you're at least seeing some kind of result. And no worries on the problem, I'm actually glad you have a reproducible case because the times I got this error, I was usually in the middle of work and just tweaked my query until it returned. Though I think my case was always related to the new Date functionality and this it turns out is unrelated.

Ok, so I just pushed something to test to master, so if you run Pkg.update() again (now that you've set up ODBC to track master) it should pull this in. I'm not positive it'll actually work, but I added some debug functionality, so when you can a chance to run it, I'd appreciate hearing what is printed. I think I understand the issue now, so I think this should be a working solution once we get any bugs ironed out. Thanks for your help with this.

-Jacob

On Sep 7, 2013 8:49 AM, "rogerjbos" notifications@github.com<mailto:notifications@github.com> wrote:

Jacob,

I ran the code again this morning and now I get partial results. I get 1 row, probably because the Rows: was changed from -1 to 1. I also show the output of Pkg.checkout()

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000f52f860 Statement pointer: Ptr{Void} @0x000000000ce9b9b0 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: Cloning cache of UTF16 from git://github.com/nolta/UTF16.jl.git INFO: Installing UTF16 v0.2.0

julia>

From: Jacob Quinn [mailto:notifications@github.com]mailto:[mailto:notifications@github.com] Sent: Friday, September 06, 2013 4:43 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm.......this is puzzling. If you run Pkg.checkout("ODBC"), what does it print? We need to simplify the debugging process here without having to push everything to the package system. Pkg.checkout should try to keep your ODBC package current with whatever I push to the github repo (If I understand it correctly, though I currently can't get it to work for me. I just posted in the forum about it). That way, I can actually push some debugging prints in the code for you to run and get a better idea of what's really going on.

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23967884>.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23993635 .

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23999070.

quinnj commented 11 years ago

Hmmm.......sounds like you're not seeing the new code I pushed. You may have to run Pkg.checkout("ODBC") again to make sure you have the latest master code.

-Jacob

On Sat, Sep 7, 2013 at 2:09 PM, rogerjbos notifications@github.com wrote:

Jacob,

Output is the same. When I update it says, “No packages to install, update or remove.” I tried modifying the query a little bit but I still only get 1 row.

I am working on getting sublime up and running. When sublime is working for me, will I be able to run code sections like I can in R, or in Julia do I have to run the whole file? Julia Studio only has an option to run the whole file (as far as I can tell so far). When I was learning Python I was using PyScripter and it also only sent the whole file for execution. I like being able to run small pieces of code.

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Updating ODBC... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 2 Connection pointer: Ptr{Void} @0x000000000f52fbf0 Statement pointer: Ptr{Void} @0x000000000cd1e400 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> query("select top 5 * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> query("select Strategy, Absolute from roger_intraday") 1x2 DataFrame: Strategy Absolute [1,] "SC" 1.6358

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: No packages to install, update or remove.

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Saturday, September 07, 2013 11:10 AM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Glad to hear you're at least seeing some kind of result. And no worries on the problem, I'm actually glad you have a reproducible case because the times I got this error, I was usually in the middle of work and just tweaked my query until it returned. Though I think my case was always related to the new Date functionality and this it turns out is unrelated.

Ok, so I just pushed something to test to master, so if you run Pkg.update() again (now that you've set up ODBC to track master) it should pull this in. I'm not positive it'll actually work, but I added some debug functionality, so when you can a chance to run it, I'd appreciate hearing what is printed. I think I understand the issue now, so I think this should be a working solution once we get any bugs ironed out. Thanks for your help with this.

-Jacob

On Sep 7, 2013 8:49 AM, "rogerjbos" <notifications@github.com<mailto: notifications@github.com>> wrote:

Jacob,

I ran the code again this morning and now I get partial results. I get 1 row, probably because the Rows: was changed from -1 to 1. I also show the output of Pkg.checkout()

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000f52f860 Statement pointer: Ptr{Void} @0x000000000ce9b9b0 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: Cloning cache of UTF16 from git://github.com/nolta/UTF16.jl.git INFO: Installing UTF16 v0.2.0

julia>

From: Jacob Quinn [mailto:notifications@github.com]<mailto:[mailto: notifications@github.com]> Sent: Friday, September 06, 2013 4:43 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm.......this is puzzling. If you run Pkg.checkout("ODBC"), what does it print? We need to simplify the debugging process here without having to push everything to the package system. Pkg.checkout should try to keep your ODBC package current with whatever I push to the github repo (If I understand it correctly, though I currently can't get it to work for me. I just posted in the forum about it). That way, I can actually push some debugging prints in the code for you to run and get a better idea of what's really going on.

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23967884>.

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23993635> .

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23999070>.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-24006505 .

quinnj commented 11 years ago

With Sublime-Julia, you can run as much code as you want. If no text is selected, pressing ctrl+enter will run the current line, if text is selected, the selected text will run, and if you press ctrl+shift+enter, it will run the entire file. I agree, much better than having to run an entire file.

Actually, if you'd like to try out the latest beta version of Sublime-Julia, you can get the repo here. I can help you with setup if you'd like. In general it's pretty stable and I've been using it for about a month now. It has some advantages over the current Sublime-Julia repo as I've rewritten it from the ground up.

rogerjbos commented 11 years ago

Jacob,

Now I am seeing the changes. It seems there is a delay with Git in that I don’t immediately see the changes you make. Anyway, the output is below, but now there is a float error so I don’t actually get a result. There should be 7 rows in the table and its still saying 1 row. Should be 5 columns.

Thanks,

Roger

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: No packages to install, update or remove.

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Updating ODBC... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000f0aa4b0 Statement pointer: Ptr{Void} @0x00000000051c4820 Contains resultset? No

julia> query("select * from roger_intraday") testrowcounter: 1 testcolcounter: 1 testcolcounter: 2 ERROR: no method append!(Array{Float64,1},Float64) in ODBCFetch at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:126 in push! at array.jl:654WARNING: backtraces on your platform are often misleading or partially incorrect

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Saturday, September 07, 2013 7:55 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm.......sounds like you're not seeing the new code I pushed. You may have to run Pkg.checkout("ODBC") again to make sure you have the latest master code.

-Jacob

On Sat, Sep 7, 2013 at 2:09 PM, rogerjbos notifications@github.com<mailto:notifications@github.com> wrote:

Jacob,

Output is the same. When I update it says, “No packages to install, update or remove.” I tried modifying the query a little bit but I still only get 1 row.

I am working on getting sublime up and running. When sublime is working for me, will I be able to run code sections like I can in R, or in Julia do I have to run the whole file? Julia Studio only has an option to run the whole file (as far as I can tell so far). When I was learning Python I was using PyScripter and it also only sent the whole file for execution. I like being able to run small pieces of code.

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Updating ODBC... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 2 Connection pointer: Ptr{Void} @0x000000000f52fbf0 Statement pointer: Ptr{Void} @0x000000000cd1e400 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> query("select top 5 * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> query("select Strategy, Absolute from roger_intraday") 1x2 DataFrame: Strategy Absolute [1,] "SC" 1.6358

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: No packages to install, update or remove.

julia>

From: Jacob Quinn [mailto:notifications@github.com]mailto:[mailto:notifications@github.com] Sent: Saturday, September 07, 2013 11:10 AM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Glad to hear you're at least seeing some kind of result. And no worries on the problem, I'm actually glad you have a reproducible case because the times I got this error, I was usually in the middle of work and just tweaked my query until it returned. Though I think my case was always related to the new Date functionality and this it turns out is unrelated.

Ok, so I just pushed something to test to master, so if you run Pkg.update() again (now that you've set up ODBC to track master) it should pull this in. I'm not positive it'll actually work, but I added some debug functionality, so when you can a chance to run it, I'd appreciate hearing what is printed. I think I understand the issue now, so I think this should be a working solution once we get any bugs ironed out. Thanks for your help with this.

-Jacob

On Sep 7, 2013 8:49 AM, "rogerjbos" <notifications@github.com<mailto: mailto:notifications@github.com%3cmailto:%20%0b> notifications@github.commailto:notifications@github.com>> wrote:

Jacob,

I ran the code again this morning and now I get partial results. I get 1 row, probably because the Rows: was changed from -1 to 1. I also show the output of Pkg.checkout()

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000f52f860 Statement pointer: Ptr{Void} @0x000000000ce9b9b0 Contains resultset? No

julia> query("select * from roger_intraday") 1x5 DataFrame: Strategy Absolute Relative Detail datadate [1,] "SC" 1.6358 -0.0329 "<span class=\"footText\"><a CLASS=\"nav\" hr ef=\"/intraday_SC.xls\">SC" "2013-06-27 16:12:23"

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: Cloning cache of UTF16 from git://github.com/nolta/UTF16.jl.git INFO: Installing UTF16 v0.2.0

julia>

From: Jacob Quinn [mailto:notifications@github.com]mailto:[mailto:notifications@github.com]<mailto:[mailto: <mailto:[mailto:%20%0b>> notifications@github.commailto:notifications@github.com]> Sent: Friday, September 06, 2013 4:43 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm.......this is puzzling. If you run Pkg.checkout("ODBC"), what does it print? We need to simplify the debugging process here without having to push everything to the package system. Pkg.checkout should try to keep your ODBC package current with whatever I push to the github repo (If I understand it correctly, though I currently can't get it to work for me. I just posted in the forum about it). That way, I can actually push some debugging prints in the code for you to run and get a better idea of what's really going on.

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23967884>.

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23993635> .

— Reply to this email directly or view it on GitHub< https://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-23999070>.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-24006505 .

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-24012196.

rogerjbos commented 11 years ago

Jacob,

I downloaded Sublime Text 3, is that version okay? I got hung up because I couldn’t find julia-basic.bat in my installation. I downloaded the windows binary. Do I have to download the source to get julia-basic.bat? Currently when I press cntr-enter it says ”Cannot find REPL for ‘Julia”” I do have julia.bat in my path.

Thanks,

Roger

From: Jacob Quinn [mailto:notifications@github.com] Sent: Saturday, September 07, 2013 7:58 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

With Sublime-Julia, you can run as much code as you want. If no text is selected, pressing ctrl+enter will run the current line, if text is selected, the selected text will run, and if you press ctrl+shift+enter, it will run the entire file. I agree, much better than having to run an entire file.

Actually, if you'd like to try out the latest beta version of Sublime-Julia, you can get the repo herehttps://github.com/karbarcca/SJTest. I can help you with setup if you'd like. In general it's pretty stable and I've been using it for about a month now. It has some advantages over the current Sublime-Julia repo as I've rewritten it from the ground up.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-24012232.

quinnj commented 11 years ago

Ok, I just pushed another fix for the append! issue. Hopefully you'll be able to pull it soon (you can always go into the package folder manually and run git pull).

As for Sublime-Julia, the julia-basic.bat file actually comes with the Sublime-Julia installation, so within Sublime if you go Preferences -> Browse Packages, then open up the Sublime-Julia package you should see it there. You can copy it into your julia installation directory and should be good to go. Sublime 3 is recommended right now.

rogerjbos commented 11 years ago

Jacob,

On ODBC, I updated and I get a different error from last time.

On Sublime, I still get Cannot find REPL for ‘Julia’ even after doing the following: I found the Julia-basic.bat file and copied it over to C:\julia\julia-dca8d76c37\bin. Then I modified "default_extend_env" in SublimeJulia.sumlime-settings to look like this: "default_extend_env": {"PATH": "C:/julia/julia-dca8d76c37/bin; {PATH}"}, BTW, my PATH includes C:\julia\julia-dca8d76c37\bin\, so if I type “julia-basic.bat” at a command prompt Julia will open.

Thanks,

Roger

julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: No packages to install, update or remove.

julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x0000000010fd8a10 Statement pointer: Ptr{Void} @0x0000000010180010 Contains resultset? No

julia> query("select * from roger_intraday") testrowcounter: 1 testcolcounter: 1 ERROR: no method convert(Type{String},Array{String,1}) in push! at array.jl:653 in ODBCFetch at C:\Users\bosr\AppData\Roaming\julia\packages\ODBC\src\backend.j l:126 in push! at array.jl:654WARNING: backtraces on your platform are often misleading or partially incorrect

julia>

From: Jacob Quinn [mailto:notifications@github.com] Sent: Sunday, September 08, 2013 9:44 AM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Ok, I just pushed another fix for the append! issue. Hopefully you'll be able to pull it soon (you can always go into the package folder manually and run git pull).

As for Sublime-Julia, the julia-basic.bat file actually comes with the Sublime-Julia installation, so within Sublime if you go Preferences -> Browse Packages, then open up the Sublime-Julia package you should see it there. You can copy it into your julia installation directory and should be good to go. Sublime 3 is recommended right now.

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-24021067.

quinnj commented 11 years ago

Hmmm......there's always been something about the Sublime-Julia default_extend_env stuff that didn't quite work for me. Luckily with the new beta version soon to be released, everything should be drastically simpler. I'll try to push that out in the next few days so that people can just install through the package control system in Sublime. It has a much simpler install process (just install the process and if julia is in your path, your'e good to go!).

I pushed another fix for the query problem. Thanks again for debugging this with me and sorry it's been a pain. :)

rogerjbos commented 11 years ago

Jacob,

Success! We are getting full query results now.

Thanks,

Roger

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating UTF16.jl... INFO: Updating ODBC... INFO: Computing changes... INFO: No packages to install, update or remove.

julia> julia> Pkg.checkout("ODBC") INFO: Checking out ODBC master... INFO: No packages to install, update or remove.

julia> julia> using ODBC

julia> co = ODBC.connect("xfdr",usr="xfl",pwd="xfl")

julia> ODBC Connection Object

Connection Data Source: xfdr xfdr Connection Number: 1 Connection pointer: Ptr{Void} @0x000000000bd3ab60 Statement pointer: Ptr{Void} @0x0000000009a31e50 Contains resultset? No

julia> query("select strategy, absolute, datadate from roger_intraday”) testrowcounter: 1 testcolcounter: 1 testcolcounter: 2 testcolcounter: 3 testrowcounter: 2 testcolcounter: 4 testcolcounter: 5 testcolcounter: 6 testrowcounter: 3 testcolcounter: 7 testcolcounter: 8 testcolcounter: 9 testrowcounter: 4 testcolcounter: 10 testcolcounter: 11 testcolcounter: 12 testrowcounter: 5 testcolcounter: 13 testcolcounter: 14 testcolcounter: 15 testrowcounter: 6 testcolcounter: 16 testcolcounter: 17 testcolcounter: 18 testrowcounter: 7 testcolcounter: 19 testcolcounter: 20 testcolcounter: 21 7x3 DataFrame: strategy absolute datadate [1,] "SC" 1.6358 "2013-06-27 16:12:23" [2,] "SCV" 1.6858 "2013-06-27 16:12:23" [3,] "SCG" 1.1899 "2013-06-27 16:12:23" [4,] "SMC" 1.4824 "2013-06-27 16:12:23" [5,] "SMCV" 1.5247 "2013-06-27 16:12:23" [6,] "LC" 0.8796 "2013-06-27 16:12:23" [7,] "LCV" 0.8859 "2013-06-27 16:12:23"

From: Jacob Quinn [mailto:notifications@github.com] Sent: Sunday, September 08, 2013 6:39 PM To: karbarcca/ODBC.jl Cc: rogerjbos Subject: Re: [ODBC.jl] ODBC in Julia Studio on Windows (#19)

Hmmm......there's always been something about the Sublime-Julia default_extend_env stuff that didn't quite work for me. Luckily with the new beta version soon to be released, everything should be drastically simpler. I'll try to push that out in the next few days so that people can just install through the package control system in Sublime. It has a much simpler install process (just install the process and if julia is in your path, your'e good to go!).

I pushed another fix for the query problem. Thanks again for debugging this with me and sorry it's been a pain. :)

— Reply to this email directly or view it on GitHubhttps://github.com/karbarcca/ODBC.jl/issues/19#issuecomment-24031208.

quinnj commented 11 years ago

Great news! I'll push a change to take out the printing statements.