Re: Create Table Example in asp
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Wed, 7 Dec 2005 13:47:57 -0500
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.
.
- References:
- Re: Create Table Example in asp
- From: JHP
- Re: Create Table Example in asp
- From: Bob Barrows [MVP]
- Re: Create Table Example in asp
- From: JHP
- Re: Create Table Example in asp
- Prev by Date: delete a folder and all subfolders
- Next by Date: Re: Update Computer Description from text File
- Previous by thread: Re: Create Table Example in asp
- Next by thread: Re: Create Table Example in asp
- Index(es):
Relevant Pages
|
|