473,466 Members | 4,869 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

access97 runtime error 3075 missing operator

I have an ftp program that i inherited and i tried to modify it to ftp
over my file however, i receive an error message :

run-time error '3075
syntax error (missing operator) in query expression " Get
PROD6-12-22-03-299-2
c:temp\'PROD6FTCERT.txt 0 As Expr1;'.

i'm clueless why i have a missing operator? if anyone has a
suggestions that would be greatly appreciated :)
thanks in advance - jung

here is part of the code:

If Me.chkSeriesInt = -1 Then
myreport = "'PROD6"
saveasname = "Prod6"
myshortname = rst.Fields("DataBaseLongName") 'Database name
myftpdir = rst.Fields("DatabaseFTPAddress") 'Location of files
on FTP server

'change FTP directory to correct location
'strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT
'CD & myftpdir AS Expr1;"
strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT
'CD " & myftpdir & "]' AS Expr1;"

Set qdf = dbs.CreateQueryDef("", strSQL)
qdf.Execute

If myshortname = "USBCERT" Then
myfiledate = Me.txtusbcertfiledateSeriesInt
myopnum = Me.txtusbcertopnumseriesint
myfilenumber = Me.txtusbcertfilenumSeriesInt
'ElseIf myshortname = "USBMABS" Then
'myfiledate = Me.txtusbmabsfiledateActive
'myopnum = me.txtusbmabsopnumseriesint
'myfilenumber = Me.txtusbmabsfilenumActive
Else '"FTCERT"
myfiledate = Me.txtftcertfiledateSeriesInt
myopnum = Me.txtftcertopnumseriesint
myfilenumber = Me.txtftcertfilenumSeriesInt
End If

strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT
'GET PROD6-" & Format(myfiledate, "mm-dd-yy") & "-" & myopnum & "-" &
myfilenumber ' & "-" & myreport
strSQL = strSQL & " " & Me.txtSavedDataLocation & myreport &
myshortname & ".txt 0'"
strSQL = strSQL & " AS Expr1;"

'i receive the error message on this line
Set qdf = dbs.CreateQueryDef("", strSQL)
qdf.Execute
End If
Nov 12 '05 #1
1 4570
It looks as though you're trying to issue FTP commands as SQL. You can't do
that.

There are 2 different approaches to FTP illustrated at "The Access Web"

http://www.mvps.org/access/modules/mdl0015.htm shows you how to create a
script file and call it from Access.

http://www.mvps.org/access/modules/mdl0037.htm shows you how to use the
Internet Data Transfer library.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
I have an ftp program that i inherited and i tried to modify it to ftp
over my file however, i receive an error message :

run-time error '3075
syntax error (missing operator) in query expression " Get
PROD6-12-22-03-299-2
c:temp\'PROD6FTCERT.txt 0 As Expr1;'.

i'm clueless why i have a missing operator? if anyone has a
suggestions that would be greatly appreciated :)
thanks in advance - jung

here is part of the code:

If Me.chkSeriesInt = -1 Then
myreport = "'PROD6"
saveasname = "Prod6"
myshortname = rst.Fields("DataBaseLongName") 'Database name
myftpdir = rst.Fields("DatabaseFTPAddress") 'Location of files
on FTP server

'change FTP directory to correct location
'strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT
'CD & myftpdir AS Expr1;"
strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT
'CD " & myftpdir & "]' AS Expr1;"

Set qdf = dbs.CreateQueryDef("", strSQL)
qdf.Execute

If myshortname = "USBCERT" Then
myfiledate = Me.txtusbcertfiledateSeriesInt
myopnum = Me.txtusbcertopnumseriesint
myfilenumber = Me.txtusbcertfilenumSeriesInt
'ElseIf myshortname = "USBMABS" Then
'myfiledate = Me.txtusbmabsfiledateActive
'myopnum = me.txtusbmabsopnumseriesint
'myfilenumber = Me.txtusbmabsfilenumActive
Else '"FTCERT"
myfiledate = Me.txtftcertfiledateSeriesInt
myopnum = Me.txtftcertopnumseriesint
myfilenumber = Me.txtftcertfilenumSeriesInt
End If

strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT
'GET PROD6-" & Format(myfiledate, "mm-dd-yy") & "-" & myopnum & "-" &
myfilenumber ' & "-" & myreport
strSQL = strSQL & " " & Me.txtSavedDataLocation & myreport &
myshortname & ".txt 0'"
strSQL = strSQL & " AS Expr1;"

'i receive the error message on this line
Set qdf = dbs.CreateQueryDef("", strSQL)
qdf.Execute
End If

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: khan | last post by:
getting, error, 3075 Syntax Error (Missing Operator) in query expression '8WHERE .=1' Dim TotalQty As Integer TotalQty = DLookup("", "", "=" & Forms!!)
4
by: khan | last post by:
getting, error, 3075 Syntax Error (Missing Operator) in query expression '8WHERE .=1' Dim TotalQty As Integer TotalQty = DLookup("", "", "=" & Forms!!)
1
by: Mike N. | last post by:
Hello- I have a normal application split into a frontend and backend. The tables are in the backend. All tables open correctly from the backend. When in the OBJECTS window (F11) in the front...
5
by: MARTINQC | last post by:
"SELECT ., .Category INTO tblSiteGroupActiveTicketRawData FROM .Base = 'AAAA') OR (.Base = 'BBBB')) AND (.Status != 'Closed');" Above SQL string fails with a runtime error 3075 syntax error...
1
by: kickergirl | last post by:
I recently created a database in Access 2000 that has been distributed to multiple people using various versions of Access. Each person is using it as a standalone database. The database has...
5
by: Ledo | last post by:
I have a form that I want to show invoices in a date range. When clicking on the button I get the following error: Run Time Error 3075 Syntax error (missing operator) in query expression...
22
by: ozgenaga | last post by:
Hi guys, I am trying to insert new data records to a table but I am getting a run-time error. I would appreciate any kind of help. Here is my code: Sub WorstQueryEver() Dim db As...
3
by: timber910 | last post by:
Hello All, I'm in need of help here. I have build my query in a query builder in access as a select query. Query runs fine. Changed it to a make table query. Query makes table ok. Copy and pasted...
6
by: ahd2008 | last post by:
Hi, I have a table for the enrollment of the employees: Employee ID Session ID Status(In-Progress;Complete;Cancel;No-Show;Waiting List) as Combo Box Plan Remarks
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.