Re: Create Table SQL not working

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



My wife is into quilts and she asked me to write a program to get ALL
possibilities for combining certain patterns - it's not a 'relational
database' - I just plug in some parameters and let it go. When a solution is
found I want to save it in a table as 'Quilt1' and then it continues to
calculate a new solution and I want to save that in table 'Quilt2', etc.
Then when all solutions (unknown) are done I can review and print them by
number. I know this may not be the best environment to do this type of thing
but I think that the problem I'm having is completely separate from the
application itself. Namely, how to concatenate the number to the
'MeaningfulName' part of the filename so that the 'Create Table' SQL string
accepts it. Like I said, I can create a table called 'Solutions' but not
after I have concatenated a
Str(Number) to it- I get a syntax error - try it!! I'm using 2003, by the
way, and I chose this program just because I'm writing databases for my work
right now and I thought I could use the experience. Thanx

"Jeff Boyce" wrote:

> Gil
>
> Building multiple tables, with "meaning" embedded in the table names, is
> rarely a workable solution in a relational database. Perhaps if you explain
> a bit more what you are trying to do, with an example, folks in the
> newsgroup could offer alternate approaches.
>
> Good luck
>
> Jeff Boyce
> <Access MVP>
>
> "Gil, Not the Fish" <GilNottheFish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
> message news:3BA473DA-8F91-4750-A932-7865EAB86C05@xxxxxxxxxxxxxxxx
> >I am doing calculations that have many different solutions and I would like
> > to save the solutions to different tables. It is unknown how many
> > solutions
> > there will be. I wanted to create a table for each solution (216 entries
> > each) so I put this code in after a solution was reached.
> > intSolutNum=intSolutNum+1
> > strSolutNum=Str(SolutNum)
> > strFileName="Solution" & strSolutNum
> > strSQL="Create Table " & strFileName & " (Myfield Number)"
> >
> > The code works to create a table if all I have is "Solution" for the Table
> > Name but as soon as I try to add the Number to the filename it gives me a
> > syntax error. Is there some other format for to add a number after each
> > table name. Or is there another way to go at the whole thing?? Thanx for
> > any help
> >
> > --
> > Gil
>
>
>
.



Relevant Pages

  • Re: It record exists then...
    ... Dim rs As Recordset, db As Database ... Set db = CurrentDb ... Error: Syntax Error. ... If this PartNumber already exists in the InfoTbl (in the field ...
    (microsoft.public.access.formscoding)
  • Re: JET Database errors
    ... I checked the sql of the page and it appears to be correct. ... to edit any records in any databases on my server give the same error). ... a copy of JET Database update 4.0, but I'm not going to install it until I ... > The first thing I would check for is a syntax error in the UPDATE ...
    (microsoft.public.frontpage.programming)
  • Re: SQL 2005 Embedded and Moving Sharepoint Services Database
    ... Below is the command I ran, with the name of the database. ... C:\Program Files>cd microsoft sql server ... I have successfully moved some of the other databases using the OSQL command, but when I try to move this one particular database I keep getting a syntax error. ... When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. ...
    (microsoft.public.sqlserver.msde)
  • Re: Syntax error in UPDATE statement.
    ... the "syntax error" indicates that there is something wrong with the ... > Database Results Error ... Microsoft OLE DB Provider for ODBC Drivers ... > The following error message comes from the database driver software; ...
    (microsoft.public.frontpage.client)
  • Re: Updating Tables in Other Databases through Forms
    ... Looks like a syntax error to me. ... See http://www.QBuilt.com for all your database needs. ... When I try to view the query I get the following ...
    (microsoft.public.access.formscoding)