Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2004, 05:55 AM
x23 x23 is offline
Registered User
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft Text Driver and ADODB ?

Hi,

<script language="vbs">
Dim Conn, rs
Set Conn = CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
"Dbq=http://127.0.0.1;" & _
"Extensions=asc,csv,tab,txt;" & _
"Persist Security Info=False"
Dim sql
sql = "SELECT * from foobar.txt"
set rs = conn.execute(sql)
set rs =CreateObject("ADODB.recordset")
rs.Open "SELECT * from foobar.txt", conn
...
I have code like this I want to run.

Idea is for the CLIENT to connect to SERVER page
and begins download from foobar.txt into
a file locally.

My current test machine is Windows with SERV-U for ftp server
and Apache 1.3.29 for the webserver with PHP.

I get the following error: "[Microsoft][ODBC Text Driver] Internal internet failure"

Does this mean I need to actually install ADODB for this to work ?
Do I need to install Microsoft SQL server ?
Do I need to add ADODB support to PHP ? How cna I check if I have
support for it already if this is the case ?
Is all this possible from a Unix machine ?

I realize this is the "MySQL" section but I wrote this here
as I hoped MySQL people would have experience with this.

I heard that you need an 'anon' user to have access rights
to read the foobar.txt file. I know there has to be an anonymous FTP user - which exists. But what other 'anon' user is there meant to be, this is where I am confused.

Please help.

Thank you.


 
Old November 5th, 2004, 06:09 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

      ODBC Driver for Text
oConn.Open _
    "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
    "Dbq=c:\somepath\;" & _
    "Extensions=asc,csv,tab,txt"
Then specify the filename in the SQL statement:
oRs.Open "Select * From customer.csv", _
         oConn, adOpenStatic, adLockReadOnly, adCmdText
Note: If you are using a Tab delimited file, then make sure you create a schema.ini file, and include the "Format=TabDelimited" option.
For more information, see: Text File Driver Programming Considerations
To view Microsoft KB articles related to Microsoft Text Driver, click here


Gokulan Ethiraj
 
Old November 7th, 2004, 09:08 PM
x23 x23 is offline
Registered User
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you know how one could store a small BINARY in a file
on the server using ADODB stream, say it would be in blah.txt
and the data that is LOCALLY saved gets saved into
the working .EXE ?

I heard its possible to encode BINARY into valid strings
and then you can decode them...



 
Old February 15th, 2005, 05:27 PM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I too have been trying to recreate the PoC that you are referring to in your posting. I am also struggling with the foobar.txt part. I have Apache and Filezilla (FTP server) installed on a local virtual machine but my ADODB connection (from a second virtual machine)) to retrieve the text file is not working. I have not installed PHP yet. Do you know what exactly I need to install on the web server client to allow the ADODB connection to it to work?

In my FTP server all I have done is to create a new user called Anonymous with no password. Do I need to do anything else here?

Do I need to configure Apache in a certain way?

If you managed to find this out, I would be grateful of you would share the information with me.

Thanks.

jm





Similar Threads
Thread Thread Starter Forum Replies Last Post
ODBC Microsoft Access Driver Issue mat41 Classic ASP Professional 5 June 30th, 2008 10:37 AM
Microsoft Excel Driver Error cancer10 Classic ASP Databases 0 January 23rd, 2007 06:42 AM
Microsoft Text Driver Use ronhawker SQL Server ASP 15 December 20th, 2005 06:12 PM
[Microsoft][ODBC Microsoft Access Driver] Syntax e chinedu Classic ASP Databases 3 November 18th, 2004 03:48 PM
Microsoft Text Driver ??? x23 SQL Server ASP 0 November 5th, 2004 05:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.