Re: Create Table Example in asp



Look, you're reacting very defensively and that's partly my fault. There was
nothing wrong with your advice except that it left out the admonition
against using DAO in ASP. Here is why:
http://support.microsoft.com/kb/q156138/#XSLTH3128121123120121120120

JHP wrote:
> I always show a couple of methods in an example - as there is always
> more then a single approach:
>
> Taken from: http://p2p.wrox.com/topic.asp?TOPIC_ID=3746
>
> quote:
> --------------------------------------------------------------------------
----
> Unless you've been living in a cave, you've likely been inundated
> with articles touting the virtues of ADO over DAO and urging you to
> convert all of your DAO code to ADO. My recommendation is: Don't.
> --------------------------------------------------------------------------
----
>
> and
>
>
> quote:
>
> --------------------------------------------------------------------------
----
>
> DAO was written and conceived with the Jet database engine in mind.
> It provides superior performance when working with Access/Jet tables.
>
>
> "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
> news:O4gA9U0%23FHA.3852@xxxxxxxxxxxxxxxxxxxxxxx
>> It is not recommended that DAO be usind in a multithreaded
>> application like
>> ASP. A better plan would either be to:
>> 1. Use ADOX
>> 2. Use ADO and DDL queries (CREATE TABLE, etc.)
>>
>> Bob Barrows
>> JHP wrote:
>>> The following creates the database, then the table and resulting
>>> fields:
>>>
>>> *** Watch for wordwrap ***
>>>
>>> Option Explicit
>>> On Error Resume Next
>>>
>>> Dim objDBE, objADO, strSQL
>>> Const dbVersion10 = 1
>>> Const dbVersion11 = 8
>>> Const dbVersion20 = 16
>>> Const dbVersion30 = 32
>>> Const dbVersion40 = 64
>>>
>>> Set objDBE = CreateObject("DAO.DBEngine.36")
>>> objDBE.CreateDatabase "C:\temp.mdb",
>>> ";LANGID=0x0409;CP=1252;COUNTRY=0", dbVersion40
>>> Set objDBE = Nothing
>>>
>>> Set objADO = CreateObject("ADODB.Connection")
>>> objADO.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
>>> Source=C:\temp.mdb") objADO.Execute("Create Table Test(col_1 number,
>>> col_2 text(10))") strSQL = "INSERT INTO Test(col_1, col_2) VALUES
>>> (23, 'Test');" objADO.Execute(strSQL)
>>> objADO.Close
>>> Set objADO = Nothing
>>>
>>> "Bill Barber" <BillBarber@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>>> message news:83597B9D-8E06-4DB9-A76B-75CF7703BB1B@xxxxxxxxxxxxxxxx
>>>> The past few years changes have been made to Access that prevent me
>>>> from using my old code.
>>>>
>>>> I used execute.connection "Create Proc AQuery" to create a query
>>>> from my Web
>>>> Page.
>>>>
>>>> I must now redesign my application to Create a table instead of a
>>>> query. I
>>>> have tried to find an example on the web, but the words bring up
>>>> too many unnessary results.
>>>>
>>>> Table Name = AnyTable
>>>> Field1 is a Text Field of 8 Characters
>>>> Field2 is a byte
>>>> Field3 a Single.
>>>> and Field 4 a Memo Field.
>>>>
>>>> Can anyone show me the correct syntax
>>>>
>>>> My standard SQL knowledge does not seem to work and I do not have
>>>> that much
>>>> experience with asp.
>>>>
>>>>
>>>> Thanks is advance
>>>>
>>>> Bill
>>
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Create Table Example in asp
    ... of your DAO code to ADO. ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.scripting.vbscript)
  • Re: OE Newgroup odd behavior
    ... I have a NG signature, ... I'm parsing down through many records using DAO loop, ... from that identity, but newsgroup messages, unfortunately, will not import. ... I'm now in OE as a different Identity, so I can see the missing post, just like ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Speed of working on Access tables
    ... What ADO supports depends on what the OLE DB provider for the database ... I know the DAO ... This reply is posted in the Newsgroup; please post any follow question or reply ...
    (microsoft.public.office.developer.automation)
  • Re: Back to DAO
    ... The full source code is in the newsgroup message... ... 'Microsoft DAO 2.5/3.5 Compatibility Library ... Set fld = tdf.CreateField ...
    (microsoft.public.vb.database.dao)
  • Re: Form data output
    ... > CSV file. ... Access to extract the data from Word or the text file (ADO or DAO ... reply in the newsgroup and not by e-mail :-) ...
    (microsoft.public.word.vba.userforms)