-
Can't add a new record to a table as theres no add button.
I want to add a record to a table but can't as theres no button. In the example code, if there are no records with a SupplierKey of 3 then no add button is displayed so none can be added!!!!! Help! What am I missing?
Paul
Set X=Server.CreateObject("AspDB.Pro"
X.dbUnit = 1
X.dbDSN="dbfile"
X.dbSQL="Select * FROM Desktop WHERE Desktop.SupplierKey = 3"
X.dbNavigationItem="top, next, prev, bottom, filter, add, delete, edit"
X.dbFormDisplayFlds="Logo, Title, CPU, Detail, Memory, HardDisk, CDROM, Sound, Video, Monitor, Price, URL, SpeedCallID"
X.dbGridDisplayFlds="Logo, Title, CPU, Memory, HardDisk, CDROM, Sound, Video, Monitor, Price"
X.dbExportFlds = "SupplierKey, Name, Address1, Address2, Address3, Address4, Address5, Title, Price"
X.dbGridTableTag="style=""font-family: Verdana; font-size: xx-small"""
X.dbFormTableTag="style=""font-family: Verdana; font-size: x-small"""
X.dbEditParams="TableName=Desktop,BookMarkFlds =0"
X.dbEditDropFlds = "SupplierKey,,," + CStr(session("ASPdb_1_SupplierKey")
X.dbEditFlds="SupplierKey[" + CStr(session("ASPdb_1_SupplierKey") + "], Title, CPU, Detail, Memory, HardDisk, CDROM, Sound, Video, Monitor, Price, URL"
X.ASPdbPro
-
Can't add a new record to a table as theres no add button. (reply)
Hi Paul,
In today's version, if your query returns NO records, you won't see the add
button. You can check the number of records returned (dbRecordCount) and if
it's zero, then "reload" your page and change your startup mode to EditAdd to
put the user right into Add mode.
The next version will do this automatically if you wish and will even add a
new parameter which will allow you to specify a separate SQL string to
determine the "record count".
Hope this helps,
John
On 12/21/98 8:34:17 AM, Paul Cook wrote:
> I want to add a record to a table but can't as theres no button. In the
> example code, if there are no records with a SupplierKey of 3 then no add
> button is displayed so none can be added!!!!! Help! What am I
> missing?
Paul
Set
> X=Server.CreateObject("AspDB.Pro"
X.dbUnit =
> 1
X.dbDSN="dbfile"
X.dbSQL="Select * FROM Desktop WHERE
> Desktop.SupplierKey = 3"
X.dbNavigationItem="top, next, prev,
> bottom, filter, add, delete, edit"
X.dbFormDisplayFlds="Logo,
> Title, CPU, Detail, Memory, HardDisk, CDROM, Sound, Video, Monitor, Price,
> URL, SpeedCallID"
X.dbGridDisplayFlds="Logo, Title, CPU, Memory,
> HardDisk, CDROM, Sound, Video, Monitor, Price"
X.dbExportFlds =
> "SupplierKey, Name, Address1, Address2, Address3, Address4, Address5,
> Title, Price"
X.dbGridTableTag="style=""font-family:
> Verdana; font-size:
> xx-small"""
X.dbFormTableTag="style=""font-family:
> Verdana; font-size:
> x-small"""
X.dbEditParams="TableName=Desktop,BookMarkFlds
> =0"
X.dbEditDropFlds = "SupplierKey,,," +
> CStr(session("ASPdb_1_SupplierKey")
X.dbEditFlds="SupplierKey[
> " + CStr(session("ASPdb_1_SupplierKey") + "], Title, CPU,
> Detail, Memory, HardDisk, CDROM, Sound, Video, Monitor, Price,
> URL"
X.ASPdbPro
-
Can't add a new record to a table as theres no add button. (reply)
Paul,
Add to "blank" DB problem has been fixed in Ver. 2 of ASPDB. Please contact MMS folks for the specifications and beta participation.
Frank
On 12/21/98 8:34:17 AM, Paul Cook wrote:
> I want to add a record to a table but can't as theres no button. In the
> example code, if there are no records with a SupplierKey of 3 then no add
> button is displayed so none can be added!!!!! Help! What am I
> missing?
Paul
Set
> X=Server.CreateObject("AspDB.Pro"
X.dbUnit =
> 1
X.dbDSN="dbfile"
X.dbSQL="Select * FROM Desktop WHERE
> Desktop.SupplierKey = 3"
X.dbNavigationItem="top, next, prev,
> bottom, filter, add, delete, edit"
X.dbFormDisplayFlds="Logo,
> Title, CPU, Detail, Memory, HardDisk, CDROM, Sound, Video, Monitor, Price,
> URL, SpeedCallID"
X.dbGridDisplayFlds="Logo, Title, CPU, Memory,
> HardDisk, CDROM, Sound, Video, Monitor, Price"
X.dbExportFlds =
> "SupplierKey, Name, Address1, Address2, Address3, Address4, Address5,
> Title, Price"
X.dbGridTableTag="style=""font-family:
> Verdana; font-size:
> xx-small"""
X.dbFormTableTag="style=""font-family:
> Verdana; font-size:
> x-small"""
X.dbEditParams="TableName=Desktop,BookMarkFlds
> =0"
X.dbEditDropFlds = "SupplierKey,,," +
> CStr(session("ASPdb_1_SupplierKey")
X.dbEditFlds="SupplierKey[
> " + CStr(session("ASPdb_1_SupplierKey") + "], Title, CPU,
> Detail, Memory, HardDisk, CDROM, Sound, Video, Monitor, Price,
> URL"
X.ASPdbPro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|