hi guys,
i am using postgres 8.2 and try to add some records to a table with
ADODO ... unfortunately i end up with an error when calling the
addNew() method. it says that the recordset does not support
updating...
i do open the connection the following
set RS = server.createOb ject("scripting .dictionary")
RS.open "usr", cn, 1, 3, 2
RS.addNew()
RS.update()
RS.close()
set RS = nothing
cn is the connection established with OLEDB ... connection works fine
(i can execute SQL-statements, etc) but the addnew does not work ...
the same works fine on MSSQL
does anyone have experience in this? 7 5989
michal wrote:
hi guys,
i am using postgres 8.2 and try to add some records to a table with
ADODO ... unfortunately i end up with an error when calling the
addNew() method. it says that the recordset does not support
updating...
i do open the connection the following
set RS = server.createOb ject("scripting .dictionary")
scripting.dicti onary???????
RS.open "usr", cn, 1, 3, 2
Why don't you show us your real code. This Open statement would have
thrown an error if your code was really as shown.
--
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.
oh sorry,
i just typed the wrong thing. the code has adodb.recordset ...
the above code should just demonstrate what i am doing .. i never
worked with postgres before so thats why i am wondering why this is
not working ....
should it work or is adodb somehow not supported by postgres?
On Apr 13, 7:58 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
michal wrote:
hi guys,
i am using postgres 8.2 and try to add some records to a table with
ADODO ... unfortunately i end up with an error when calling the
addNew() method. it says that the recordset does not support
updating...
i do open the connection the following
set RS = server.createOb ject("scripting .dictionary")
scripting.dicti onary???????
RS.open "usr", cn, 1, 3, 2
Why don't you show us your real code. This Open statement would have
thrown an error if your code was really as shown.
--
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.
AFAIK, it should work, but I've never used postgres, and I've never even
considered using adCmdTable from ASP. Try using a sql SELECT statement
and adCmdText (1). If you are going to be adding records only, then use
" ... WHERE =" to make sure you don't retrieve all the records in the
table without intending to use them.
You might consider using DML (INSERT, UPDATE and DELETE sql statements)
instead of recordsets for maintaining data in any case.
michal wrote:
oh sorry,
i just typed the wrong thing. the code has adodb.recordset ...
the above code should just demonstrate what i am doing .. i never
worked with postgres before so thats why i am wondering why this is
not working ....
should it work or is adodb somehow not supported by postgres?
On Apr 13, 7:58 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
>michal wrote:
>>hi guys, i am using postgres 8.2 and try to add some records to a table with ADODO ... unfortunately i end up with an error when calling the addNew() method. it says that the recordset does not support updating...
>>i do open the connection the following
>>set RS = server.createOb ject("scripting .dictionary")
scripting.dict ionary???????
>>RS.open "usr", cn, 1, 3, 2
Why don't you show us your real code. This Open statement would have thrown an error if your code was really as shown.
--
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.
tried it with a the comandText but it ends up with the same error.
i know i could do it with DML but want to avoid this for several
reasons .. i like the way with the recordset but unfortunately it
makes problems with postgres. damn!
any other ideas?
On Apr 13, 9:20 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
AFAIK, it should work, but I've never used postgres, and I've never even
considered using adCmdTable from ASP. Try using a sql SELECT statement
and adCmdText (1). If you are going to be adding records only, then use
" ... WHERE =" to make sure you don't retrieve all the records in the
table without intending to use them.
You might consider using DML (INSERT, UPDATE and DELETE sql statements)
instead of recordsets for maintaining data in any case.
michal wrote:
oh sorry,
i just typed the wrong thing. the code has adodb.recordset ...
the above code should just demonstrate what i am doing .. i never
worked with postgres before so thats why i am wondering why this is
not working ....
should it work or is adodb somehow not supported by postgres?
On Apr 13, 7:58 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
michal wrote: hi guys, i am using postgres 8.2 and try to add some records to a table with ADODO ... unfortunately i end up with an error when calling the addNew() method. it says that the recordset does not support updating...
>i do open the connection the following
>set RS = server.createOb ject("scripting .dictionary")
scripting.dicti onary???????
>RS.open "usr", cn, 1, 3, 2
Why don't you show us your real code. This Open statement would have
thrown an error if your code was really as shown.
--
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.- Hide quoted text -
- Show quoted text -
michal wrote:
tried it with a the comandText but it ends up with the same error.
Show the code: "commandTex t" looks fishy.
i know i could do it with DML but want to avoid this for several
reasons .. i like the way with the recordset but unfortunately it
makes problems with postgres. damn!
any other ideas?
DML.,DML, DML ... oh, sorry.
IMO, in ASP, recordsets should only be used to retrieve readonly data
for display purposes. All data modifications should be done via DML.
Since cursors (recordsets) are notoriously inefficient for data
modifications, avoiding them increases the site's scalability.
However, how about a disconnected client-side cursor instead of
server-side:
const adLockBatchOpti mistic = 4
set rs=createobject ("adodb.records et")
rs.cursorlocati on=3 'adUseClient
rs.open "select <list of fieldsfrom usr where 1=2",cn, _
,adLockBatchOpt imistic ,1
'http://www.aspfaq.com/show.asp?id=209 6
set rs.activeconnec tion=nothing
cn.close
rs.addnew
....
rs.update
rs.addnew
....
rs.update
cn.open
set rs.activeconnec tion=cn
rs.updatebatch
rs.close
cn.close
--
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.
will try the disconnected recordset, but i am already thinking of
switching back to mssql ;)
you dont have to be sorry :)) i just prefer the manipulation with the
recordset ...
- i never had performance issues
- dont have to care about the datatype (e.g. dml i need apostrophies
for string, etc.)
- the code looks nicer than some cryptic string concatination
anyway thats a pragmatic question and is not important here ... i will
play around and maybe discover the reason ... or maybe its just not
supported by the postgres provider ...
michal
On Apr 13, 10:44 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
michal wrote:
tried it with a the comandText but it ends up with the same error.
Show the code: "commandTex t" looks fishy.
i know i could do it with DML but want to avoid this for several
reasons .. i like the way with the recordset but unfortunately it
makes problems with postgres. damn!
any other ideas?
DML.,DML, DML ... oh, sorry.
IMO, in ASP, recordsets should only be used to retrieve readonly data
for display purposes. All data modifications should be done via DML.
Since cursors (recordsets) are notoriously inefficient for data
modifications, avoiding them increases the site's scalability.
However, how about a disconnected client-side cursor instead of
server-side:
const adLockBatchOpti mistic = 4
set rs=createobject ("adodb.records et")
rs.cursorlocati on=3 'adUseClient
rs.open "select <list of fieldsfrom usr where 1=2",cn, _
,adLockBatchOpt imistic ,1
'http://www.aspfaq.com/show.asp?id=209 6
set rs.activeconnec tion=nothing
cn.close
rs.addnew
...
rs.update
rs.addnew
...
rs.update
cn.open
set rs.activeconnec tion=cn
rs.updatebatch
rs.close
cn.close
--
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.
michal wrote:
will try the disconnected recordset, but i am already thinking of
switching back to mssql ;)
you dont have to be sorry :)) i just prefer the manipulation with the
recordset ...
- i never had performance issues
- dont have to care about the datatype (e.g. dml i need apostrophies
for string, etc.)
If you use parameters, delimiters are no longer an issue: http://groups-beta.google.com/group/...e36562fee7804e
- the code looks nicer than some cryptic string concatination
No concatenation when using parameters (see above)
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM" This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rob Meade |
last post by:
evenin'
k - I've got a recordset that I'm dumping another recordset into - because
the source comes from a database that I cant update (probably makes more
sense to me that bit) - anyway, I need to update the new recordset which I
can do...I think however that I have missed something, as later in my code
it only seems to iterate once, and there should be at least 2 rows in the
recordset...
Can anyone confirm that when I use something...
|
by: belacyrf |
last post by:
Here's the code:
-------------------------------------------------------------------
accessID = request("accessID")
strSQL = "SELECT * From PendingAccRequests Where AccessID = "&accessID
'Create the Recordset object and run SQL statement
Set accRS = Server.CreateObject ("ADODB.Recordset")
accRS.Open strSQL, objConn
|
by: Ian Ornstein |
last post by:
in posting
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&newwindow=1&selm=bmEK9.43452%24lj.1060600%40read1.cgocable.net
Lyle showed us that an ADODB.Recordset can be created and attached to
a continuous (and datasheet) form.
I needed it for a data entry subform and I haven't been able to get it
to work.
Is there any rational for why it doesn't work with a subForm?
Any suggestions for a datasheet data entry subform with two...
|
by: Harold |
last post by:
Sat I have a customers table with the fields CustomerID and Customer and I use
the recordset.addnew method to add a new record to the table. What is the best
way to get the CustomerID of the new record after recordset.update is executed?
Recordset!CustomerID doesn't work because the recordset bookmark is on the first
record. Moving to the last record doesn't work if the recordset is based on a
query and the recordset is sorted.
Thanks!
...
|
by: Jan |
last post by:
Hi
I have a database that I use to keep track of the sales promotions that we
send to companies.
I normally send a mailing based on a subset of the companies in the database
(found using the query: QryICTMassDistribution3) , I then use a form and
the code below to create a new record in the corrispondence table to show
what corrispondence has been sent to various companies.
| |
by: Fabrice |
last post by:
Hello everybody,
I'm working with Access 2002. I have to import Data from a Foxpro table that
contains 25000 records in an Access table.
I have a couple of restrictions placed on me for the solution:
1. I am not allowed to use ODBC
2. I have to use ADO
3. I am not allowed to use Linked tables
|
by: tony010409020622 |
last post by:
I just spent 4 months taking a dotnet class where i learned very
little. One of the things I did not learn is this: What are the
dotnet equivilents of commands such as:
Adodc1.Recordset.AddNew
Adodc1.Recordset.Update
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.MoveNext
Adodc1.Recordset.Delete
|
by: darkforcesjedi |
last post by:
Creating a connectionless recordset in ADO is simple enough, but how do
you do it in DAO? I want a recordset stored in memory so I can
filter/sort it easily. If I create a table I can make it work, but I
don't want to have to read/write everything from/to disk every time I
need to use the data.
I tried:
Dim r As DAO.Recordset, tdf As DAO.TableDef
|
by: ADezii |
last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be:
Can I add New Records to the Recordset?
Does the Recordset support Bookmarks?
Can we use the Find and/or Seek Methods with this Recordset?
Does the Recordset support the use of Indexes?
Will the Absoluteposition property be able to be used on this Recordset?
etc....
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |