[AccessD] I ask Bard to write an FTP upload module

Steve Erbach erbachs at gmail.com
Wed May 10 13:00:30 CDT 2023


John,

Well, this is the time to play chess. Online opportunities to play are
limitless.

Steve Erbach



On Tue, May 9, 2023 at 4:25 PM John Colby <jwcolby at gmail.com> wrote:

> LOL.  Yes but that was when I was in High School, on the school team, and
> reading every book I could get my hands on.
>
> Now I am 68 years old, can't find my navel, and haven't played a game in
> years.
>
> On Tue, May 9, 2023 at 4:29 PM Steve Erbach <erbachs at gmail.com> wrote:
>
> > John,
> >
> > Well, according to some historical data on the US Chess web site (from
> > 2004), 1800 puts you in the 93 percentile... so not too shabby.
> >
> >
> > On Tue, Apr 25, 2023 at 11:47 AM John Colby <jwcolby at gmail.com> wrote:
> >
> > > I had a chess game, complete with a physical electronic board.  It was
> > > pretty good, though I was never better than about an 1800 or
> thereabouts
> > so
> > > my concept of 'pretty good' is relative.  I also played an game on my
> > > computer.
> > >
> > > On Tue, Apr 25, 2023 at 11:45 AM Rocky Smolin <rockysmolin2 at gmail.com>
> > > wrote:
> > >
> > > > I think writing code will be the next Holy Grail of AI.  Time was
> that
> > it
> > > > was the chess program problem. Then in the 1980s (if memory serves -
> > > which
> > > > it does about 1/2 the time now)Dan and Kathy Spracklin wrote Sargon
> II
> > to
> > > > run on an 8080 DOS box, and blew the chess world out of the water.
> > > >
> > > > r
> > > >
> > > > On Tue, Apr 25, 2023 at 8:35 AM Arthur Fuller <
> fuller.artful at gmail.com
> > >
> > > > wrote:
> > > >
> > > > > Look at the upside.  There is  still a need for us carbon units.
> > > > >
> > > > > On Tue., Apr. 25, 2023, 11:27 a.m. Rocky Smolin, <
> > > rockysmolin2 at gmail.com
> > > > >
> > > > > wrote:
> > > > >
> > > > > > I got a popup in Edge - Bear is ready to write code for me.  So I
> > > > > > thought I'd give it a try with the FTP Upload program I'm trying
> to
> > > > > write.
> > > > > > Said "write a module in VBA to FTP a file to a server"
> > > > > >
> > > > > > Below is the original code and my modifications to pick up the
> > > > arguments
> > > > > > from a table.
> > > > > >
> > > > > > It errors out on the line  Set oFTP = CreateObject("FSO.Ftp")
> 429 -
> > > > > ActiveX
> > > > > > component cannot create object.
> > > > > >
> > > > > > The code looks pretty simple, straightforward. Is there a simple,
> > > > > > straightforward fix for this?
> > > > > >
> > > > > > MTIA
> > > > > >
> > > > > > Rocky
> > > > > >
> > > > > >
> > > > > > Here's the code that Bard created:
> > > > > >
> > > > > > ' Original Code
> > > > > > 'Declare variables
> > > > > > 'Dim oFSO As Object
> > > > > > 'Dim oFTP As Object
> > > > > > 'Dim strServer As String
> > > > > > 'Dim strUserName As String
> > > > > > 'Dim strPassword As String
> > > > > > 'Dim strLocalFile As String
> > > > > > 'Dim strRemoteFile As String
> > > > > >
> > > > > > 'Set variables
> > > > > > 'strServer = "myserver.example.com"
> > > > > > 'strUserName = "username"
> > > > > > 'strPassword = "password"
> > > > > > 'strLocalFile = "C:\Users\YourUserName\Desktop\myfile.txt"
> > > > > > 'strRemoteFile = "/myfolder/myfile.txt"
> > > > > >
> > > > > > 'Create an instance of the FileSystemObject
> > > > > > 'Set oFSO = CreateObject("Scripting.FileSystemObject")
> > > > > >
> > > > > > 'Create an instance of the FTP object
> > > > > > 'Set oFTP = CreateObject("FSO.Ftp")
> > > > > >
> > > > > > 'Open a connection to the FTP server
> > > > > > 'oFTP.Open strServer, strUserName, strPassword
> > > > > >
> > > > > > 'Upload the file
> > > > > > 'oFTP.PutFile strLocalFile, strRemoteFile
> > > > > >
> > > > > > 'Close the connection
> > > > > > 'oFTP.Close
> > > > > >
> > > > > > And here's the code I modified to pick up the arguments from a
> > table:
> > > > > >
> > > > > > 'Dim oFSO As Object
> > > > > > 'Dim oFTP As Object
> > > > > > 'Dim strServer As String
> > > > > > 'Dim strUserName As String
> > > > > > 'Dim strPassword As String
> > > > > > 'Dim strLocalFile As String
> > > > > > 'Dim strRemoteFile As String
> > > > > >
> > > > > > 'Set variables
> > > > > > 'strServer = Me.fldHost
> > > > > > 'strUserName = Me.fldUser
> > > > > > 'strPassword = Me.fldPassword
> > > > > > 'strLocalFile = Me.fldFileToUpload
> > > > > > 'strRemoteFile = Me.fldDestinationDirectory &
> > > Me.fldDestinationFileName
> > > > > >
> > > > > > 'Create an instance of the FileSystemObject
> > > > > > 'Set oFSO = CreateObject("Scripting.FileSystemObject") '
> > > > > >
> > > > > > 'Create an instance of the FTP object
> > > > > > 'Set oFTP = CreateObject("FSO.Ftp")
> > > > > >
> > > > > > 'Open a connection to the FTP server
> > > > > > 'oFSO.Open strServer, strUserName, strPassword
> > > > > >
> > > > > > 'Upload the file
> > > > > > 'oFTP.PutFile strLocalFile, strRemoteFile
> > > > > >
> > > > > > 'Close the connection
> > > > > > 'oFTP.Close
> > > > > > --
> > > > > > AccessD mailing list
> > > > > > AccessD at databaseadvisors.com
> > > > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > > > Website: http://www.databaseadvisors.com
> > > > > >
> > > > > --
> > > > > AccessD mailing list
> > > > > AccessD at databaseadvisors.com
> > > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > > Website: http://www.databaseadvisors.com
> > > > >
> > > > --
> > > > AccessD mailing list
> > > > AccessD at databaseadvisors.com
> > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > Website: http://www.databaseadvisors.com
> > > >
> > >
> > >
> > > --
> > > John W. Colby
> > > Colby Consulting
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> >
> >
> > --
> > Regards,
> >
> > Steve Erbach
> > Manitowoc, WI
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> John W. Colby
> Colby Consulting
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
Regards,

Steve Erbach
Manitowoc, WI


More information about the AccessD mailing list