Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ODBC

Posted on 1999-06-23
6
Medium Priority
?
522 Views
Last Modified: 2013-12-18
I am unable to update a record which is there in oracle
by using the odbc
if i directly use a update statement it works eg
res.sql = "update emp set...."
res.execute

but if i use a record set and addrow and update
it is not working
eg
res.sql = "select * from emp"
res.execute
res.addrow
res.setvalue("empno", "1234")
res.updaterow
this code is not working

if my database is on local machine it works with MS Access
if is on a remote machine it is giving an error
please help me out
My application depends on two databases MS ACCESS and Oracle

if MS Access mdb is on the local machine then my updaterow works fine
id MS ACCESS mdb is on the remote machine my updaterow does not function


in the case of oracle updaterow does not work at all
but if i use
qry.sql = "update emp set....." then it works

but if i get a record into the recordset and try ton update using update row it does not update

I am using 4.6 version

please hel me out
0
Comment
Question by:rajanb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:Antonysingh
ID: 1119526
Hi Rajanb,

This sees to be problem with your dsn. Please check, to update a remote database , you should have dsn in lotus notes server rather in the client.

If all are correct and still you getting error , Please give me the error message.

Regards,
Antony.

0
 
LVL 3

Expert Comment

by:MW
ID: 1119527
Which version of Notes are you using?

0
 
LVL 3

Expert Comment

by:MW
ID: 1119528
I forgot, could you explain more precise what do you mean by local access and remote access?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:rajanb
ID: 1119529
Edited text of question.
0
 
LVL 3

Expert Comment

by:MW
ID: 1119530
I don't want to be a pain in the ... but could you tell me as well the exact wording of the SQL statement using "update".

Also, you are creating a new row in your second example, but "update" doesn't "insert" a new row (as far as I know). So are you sure that you're doing the right (same) thing in both cases?
0
 
LVL 2

Accepted Solution

by:
Antonysingh earned 60 total points
ID: 1119531
Hi,

To insert or update a Access table, the access table should be in your loacal machine from which you are running the script and dsn shold points to that table OR

Your access table should be in Lotusnotes server and the dsn in the lotusnotes server should points to that table.  

 you can not access any Access table other than these two method.

Regard updaten row method, I have worked in that with Access table , it is working fine. The sample code is given below.

     Dim conn As New ODBCConnection
     Dim qry As New ODBCQuery
     Dim result As New ODBCResultSet

     'Connect to database through DSN entry , if success    
      proceed else exit
     
     If Not conn.ConnectTo ("TestDSN") Then
          e = conn.GetError
          emsg = conn.GetExtendedErrorMessage(e)
          Msgbox emsg
          Exit Sub
     End If

     sql = "select * from Emp"
     Set qry.Connection = conn
     qry.SQL = sql
     Set result.query = qry
     flag = result.Execute()
     result.execute
     result.addrow
     f = result.setvalue("Name", "ant222")
     f = result.setvalue("No", "112121")
     result.updaterow


I don't have Oracle to test this.

Regards,
Antony.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question