🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: SQL Create Table with Double type field

#2131
From: Viatcheslav V. Vassiliev
Date: Mon, 20 Oct 2003 05:37
89 lines
3893 bytes
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: <3f937652@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>

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-19 23:09:00 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3f8f3925$1@newsgroups.borland.com> <3f8fafca@newsgroups.borland.com> <3f9321e3$1@newsgroups.borland.com>
Subject: Re: SQL Create Table with Double type field
Date: Mon, 20 Oct 2003 09:37:20 +0400
Lines: 91
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.234.218.42
Message-ID: <3f937652@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1066628690 213.234.218.42 (19 Oct 2003 22:44:50 -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