🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2137

Re: SQL Create Table with Double type field

#2137
From: Daniel
Date: Tue, 21 Oct 2003 23:53
109 lines
4689 bytes
I seem to not be able to execute the SQL string "Create table [MyTable]
([Field1] Float, [Field2] Float)", the error is that it doesn't recognise
what a 'Float' is, if I replace that with 'Integer', or 'Currency', or
'DateTime' then it all works.

I'm assuming from what you are saying that this is because my MDAC is not up
to date. I will have a look at updating my MDAC then try again.

I wasn't aware that MDAC affected the SQL Commands an Access Database could
recognise.


"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:3f937652@newsgroups.borland.com...
> Try save these strings into test.js file and execute it:
>
> //--------------------
> var connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb;";
>
> var cat = new ActiveXObject("ADOX.Catalog");
> cat.Create(connStr);
> cat = null;
>
> var conn = new ActiveXObject("ADODB.Connection");
> conn.Open(connStr);
>
> conn.Execute("Create table [MyTable] ([Field1] Float, [Field2] Float)");
> //---------------------
>
> If it does not work, update your MDAC
(http://www.microsoft.com/downloads/)
> and Jet SP (http://www.microsoft.com/data/).
>
> For help on MS Jet (MS Access) SQL look for file jsetsql40.chm if you have
> MS Office installed. It may be located at: "C:\Program Files\Common
> Files\Microsoft Shared\Office10\XXXX\JETSQL40.CHM", where XXXX is language
> id, 1033 for US English.
>
> //----------------------
> Regards,
> Viatcheslav V. Vassiliev
> http://www.oledbdirect.com
> The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
>
>
>
> "Daniel" <admin@netcomm.com> �������/�������� � �������� ���������:
> news:3f9321e3$1@newsgroups.borland.com...
> > Thanks for your help Viatcheslav,
> >
> > but unfortunately the data_type 'Float' doesn't work when using it with
a
> MS
> > Access database.  I have been searching endlessly to find documentation
> for
> > this, but can't seem to find anywhere where it clarifies the data_types
> > available when operating with a MS Access database.
> >
> > the data_types I have been using so far (unsucessfully) are: Float,
> Double,
> > Decimal(n,m), Long Integer, LongInt, Long.
> >
> > I have a feeling that I have to first set the field to Integer than
> somehow
> > change it the type of integer to be a Double, but I can't seem to work
out
> > whether this theory is correct.
> >
> > If anyone is a wiz with MS Access and/or know of a book or web site that
> may
> > assist in this area than I would more than greatful.
> >
> >
> >
> > "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> > news:3f8fafca@newsgroups.borland.com...
> > > CREATE TABLE myTable(Field1 Float, Field2 Float)
> > >
> > > You may find info on column types in documentation for your DBMS.
> > >
> > > //----------------------
> > > Regards,
> > > Viatcheslav V. Vassiliev
> > > http://www.oledbdirect.com
> > > The fastest way to access MS SQL Server,
> > > MS Jet (Access) and Interbase (through OLEDB)
> > >
> > >
> > > "Daniel" <admin@netcomm.com> �������/�������� � �������� ���������:
> > > news:3f8f3925$1@newsgroups.borland.com...
> > > > Does anyone know how to create a table with a Number of type Double
as
> a
> > > > field.
> > > >
> > > > CREATE TABLE mytable (Field1 data_type, Field2 data_type)
> > > >
> > > > what is the data_type for creating a field of type Double?
> > > >
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <3f95c6f9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f8f3925$1@newsgroups.borland.com> <3f8fafca@newsgroups.borland.com> <3f9321e3$1@newsgroups.borland.com> <3f937652@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,d7d2d8886914c651
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-10-21 17:09:19 PST
From: "Daniel" <admin@netcomm.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3f8f3925$1@newsgroups.borland.com> <3f8fafca@newsgroups.borland.com> <3f9321e3$1@newsgroups.borland.com> <3f937652@newsgroups.borland.com>
Subject: Re: SQL Create Table with Double type field
Date: Wed, 22 Oct 2003 09:53:28 +1000
Lines: 111
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 202.174.228.150
Message-ID: <3f95c6f9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1066780409 202.174.228.150 (21 Oct 2003 16:53:29 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail