Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP says not a table
Message
De
21/09/2007 11:30:57
 
 
À
19/09/2007 15:46:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01252602
Message ID:
01255956
Vues:
20
>>>>Thanks Cetin -
>>>>
>>>>Based on your help I now have a working model. I do have one last question however. (At least I hope its the last.)
>>>>
>>>>The line
>>>>
>>>>oUsers.Open "users", oConnection, adOpenKeyset, adLockBatchOptimistic, adCmdTable
>>>>
>>>>opens the table with all records available. We then have to loop down through the table to find the record we want to edit. Is there a variation on this that would allow the open to function like a "select ... where ..." so we could open directly to the record in question?
>>>>
>>>>Thanks
>>>>- Don
>>>>
>>>>-btw I will explore the .Net option as soon as I have a few minutes to spare.
>>>
>>>Yes,
>>>Remove adCmdTable or set it to text and instead of table name "users" write a select SQL.
>>>Cetin
>>
>>Thanks Cetin
>>I have the whole thing working fine for one table but not another. Its driving me crazy! Here's the code:
>>
>>< %
>>Set oConnection = Server.CreateObject("ADODB.Connection")
>>Set oTIP = Server.CreateObject("ADODB.Recordset")
>>Set oTIP2 = Server.CreateObject("ADODB.Recordset")
>>with oConnection
>>   .ConnectionString = "Provider=VFPOLEDB;Datasource=c:\inetpub\wwwroot\tip\login\data\tipdatabase.dbc"
>>   .Mode = 16 'adModeShareDenyNone - this is value of adModeShareDenyNone constant
>>   .Open
>>   .CursorLocation = adUseClient
>>   .Execute ("set null off")
>>end with
>>
>>sql = "select * from tip where tip_id=" & lnTIP_ID
>>oTIP2.Open sql, oConnection, adOpenKeyset, adLockBatchOptimistic, adCmdText
>>
>>with oTIP2
>>   .addnew
>>' HEADER EDITS
>>   .fields("st_name").value = trim(request.form("st_name"))
>>   response.write(oTIP2("st_name")+"<BR>")         'shows we are on the right record
>>   response.write(trim(request.form("st_name")))   'shows we have the right data
>>
>>   .UpdateBatch
>>   .close
>>end with
>>% >
>>
>>This code works as shown. However if I remove the .addnew with the intent of editing the original record, it fails. I am frustrated because similar code works fine on another table. What can I be missing?
>
>Did you check errors collection and status of RS and individual fields?
>Cetin
We found the problem. It seems the sql selection of all the fields exceeds the servers capacity. If we list only the fields we actually need to update it works OK. There are over 100 fields in the table and we only are updating about 25 so this seems to work.

Thanks for your trouble. On an aside subject, I finally had a chance to look at the .net web developer and tried a few simple pages. The line *If isblank(lcTIP_id) Then* is giving me an error that says *Name 'isblank' is not declared*. A similar error occurs with varients on the same theme. Is there some global setting needed before the command language will work?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform