|
 |
asp_databases thread: Beginning of Database
Message #1 by "Jeremy Barksdale" <jtb32@h...> on Thu, 13 Sep 2001 01:02:15 -0700
|
|
How can you enter a new item in a database when the there is now way to
create a recordset. The reason why I believe there isn't a way to
create a recordset, is because with no information in the database, you
can't compare anything(there are 2 tables) in order to give you the
recordset. I guess my question is: can you open a recordset of multiple
empty tables?
Also I keep getting this error:
"Data type mismatch in criteria expression"
Thanks
Jeremy
Message #2 by "DeltaVega" <Delta@D...> on Thu, 13 Sep 2001 08:50:20 +0300
|
|
Even with an empty recordset, you can still add data.
RS("Field1") = value1
RS("Field2") = value2
RS.Update
But a better way is for you to use an INSTER INTO statement and run it like
this:
...
set DB = Server.CreateObject("ADODB.Connection")
...
strSQL = "INSERT INTO ... "
DB.Execute strSQL, adExecuteNoRecords
----- Original Message -----
From: "Jeremy Barksdale" <jtb32@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Thursday, September 13, 2001 8:48 AM
Subject: [asp_databases] Beginning of Database
>
> How can you enter a new item in a database when the there is now way to
> create a recordset. The reason why I believe there isn't a way to
> create a recordset, is because with no information in the database, you
> can't compare anything(there are 2 tables) in order to give you the
> recordset. I guess my question is: can you open a recordset of multiple
> empty tables?
>
> Also I keep getting this error:
> "Data type mismatch in criteria expression"
>
>
>
> Thanks
> Jeremy
>
>
Message #3 by Steve Carter <Steve.Carter@t...> on Thu, 13 Sep 2001 11:13:10 +0100
|
|
I haven't tried this, but what about
' oCn is an open ADODB.Connection to the database
oCn.Execute "CREATE TABLE MyTable (blah blah ..."
> How can you enter a new item in a database when the there is
> no way to create a recordset.
Also maybe you can get somewhere by looking at oCn.OpenSchema.
HTH
Steve
|
|
 |