> Thanks for the reply Please always keep the dbi-users mailing list on the mails. Others can learn from what you've done...
> After having sent my email (with some trepidation as I felt > that I was asking something that seems to be not a new problem) > I actually did find another of your answers where you refer to this file. > > Steps taken: > > A) I downloaded the latest version from (CPAN) DBD-ODBC-0.43.tar.gz > (I do not manage to install this, I assume because I dont have a C > compiler on my system > but this is another story) That's actually not the latest version. That's the latest non-developer release -- however, I believe that you will get a better build by using the latest, which is .45_18. Refer to the DBI FAQ for how to download my DBI and DBD::ODBC binaries for ActiveState, since they are behind. http://xmlproj.com/fom-serve/cache/1.html (See, MAC, I referred to it :) > B) I have read thru the longbin.pl file and used the parts that > - create a table > - write the longbinary data > > THIS WORKED as claimed by you Did you expect any different :) [snip] > > BY THE WAY: these examples work without having to put the > [fieldnames] in brackets! Yes, they should. I've found the brackets are only necessary when you have spaces in the field names or other, strange situations. For the most part, I avoid strange column names, so that helps. Mixed case column names are typically painful, especially when porting, so that may be an issue in your case, but honestly, I haven't tested it. > > BUT IT ONLY seems to work for tables diretly created from > perl::DBI > => see below > > > C) having seen that this worked, I realized that the table that I > had been > trying > to write to before had been created manually in MS Access > (Tables->new->DesignView and entering the fld names and definitions > by hand) > Although as my first email says, MS Access reports via the table_info > that the type is -1 = SQL_LONGVARCHAR, it just will not accept the > long data; > > The table_info (see below) for the DateSR table (made manually and to > which > I cannot write long data and for which I need to use brackets on > the field > names) > and the tables dtest or longtest (created under DBI control) and to which > I can write either long_char or long_binary date are exactly the same > with reference to the type etc for the long_fields. > > (NB once made with the DBI, I can also toggle the data def in Access > manually as needed to change from MEMO to OLE without affecting the > ability to write the long data; but this is not possible for a table made > first manually in ACCESS) Strange... > > I would presume that this means that the fault (as always ?) is with > uncle Bill Gates > and the MS Access product ?? I'm not sure what the GUI is doing vs. the ODBC engine, but I've always thought they did something different...have you tried making the column names all in upper case, etc? That may have an effect on the need to use the brackets, but probably won't affect the column type. > > However, in an attempt to prove this I made a second table > manually............ > to which I can write long_data without any problem ??? without needing > brackets around the field_name. So here everything seems OK. > > On further refelction, the only difference between the first > "DateSR" table > and the later tables is that "DateSR" was possibly made in MS Access > 97 before applying a massive update for MSAccess in the form of > ServicePack 1 and 2 as provided by MS; unfortunatly I cannot track > exactly which occurred first. That could be an element of this, of course. > > > So now I (we) are back to the starting point with as only conclusion: one > freak table does not allow long_data writing but (most) others do ??? > and as second conclusion: DBI/DBD::ODBC does not seem at fault. At least not today... > Sorry for all the bother and I would like to thank you (all) for > all the great > effort being put into the DBI / DBD::ODBC stuff, it makes all the > difference You are welcome. > ANNEXE > > OUTPUT from table_info per row > > Table Info Row 1 = > E:/MS_Office_docs_2002/access_db/Fred_Private/t_p_dbi > DateSR > TABLE > NUM_OF_FIELDS = 5 > FldName Type Prec Scale Null? > ID 4 10 0 no > DATE 11 19 0 yes > STRNUM 12 50 0 yes > RSTNUM 12 50 0 yes > LONGSTR -1 2147483647 0 yes > > Table Info Row 2 = > E:/MS_Office_docs_2002/access_db/Fred_Private/t_p_dbi > dtest > TABLE > NUM_OF_FIELDS = 11 > FldName Type Prec Scale Null? > MY_SINGLE 7 7 0 yes > MY_DOUBLE 8 15 0 yes > MY_SHORT 5 5 0 yes > MY_LONG 4 10 0 yes > MY_BIT -7 1 0 no > MY_BYTE -6 3 0 yes > MY_DATETIME 11 19 0 yes > MY_TEXT 12 255 0 yes > MY_LONGTEXT -1 2147483647 0 yes > MY_LONGBINARY -4 1073741823 0 yes > MY_COUNTER 4 10 0 no > > Table Info Row 3 = > E:/MS_Office_docs_2002/access_db/Fred_Private/t_p_dbi > longtest > TABLE > NUM_OF_FIELDS = 2 > FldName Type Prec Scale Null? > ID 4 10 0 no > LONGSTR -1 2147483647 0 yes > Table Info Row 4 = > E:/MS_Office_docs_2002/access_db/Fred_Private/t_p_dbi > > tAuTit > TABLE > NUM_OF_FIELDS = 3 > FldName Type Prec Scale Null? > ID 4 10 0 no > AUTHOR 12 50 0 yes > TITLE 12 50 0 yes > > > > > > > From: "Jeff Urlwin" <[EMAIL PROTECTED]> > To: "Frederik A.A. de Jonge" <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > Subject: RE: insert LONG / BLOB in MS ACCESS == Brackets > around names? > Date sent: Thu, 17 Oct 2002 09:42:32 -0400 > > > Frederik, > > > > In DBD::ODBC distribution under the mytest subdirectory, there is a > > longbin.pl. Check that out for a sample which works on MS-Access *and* > > inserts a long binary file (I used a .TIF file for my tests). The test > > basically takes an MD5 hash of the input file, inserts it, > retrieves it from > > the db and then checks the MD5 hash against the database retrieved. > > > > Jeff > > > >
