473,382 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

get exception while accessing date field

3
I am trying to acess oracle data and transfer it to access. I am checking date field and if not NULL then I try to generate sqlupdate string, but I get exception (0x80020009) in the follwing line:
sqlupdate = sqlupdate & "'"& OraRec("CURHIREDATE") &"'" &", "

I don't know how to fix this in vb. can someone help?

Here is the code:
Expand|Select|Wrap|Line Numbers
  1. set AccDb=server.CreateObject("Adodb.connection")
  2. set Oradb=server.CreateObject("Adodb.connection")
  3. set AccRec=server.createobject("ADODB.Recordset")
  4. set OraRec=server.createobject("ADODB.Recordset")
  5. Application("EmpMasterAccessDB")="Provider=Microsoft.Jet.OLEDB.4.0;DataSource=\DBProjects\EmpMaster\ EmpMasterCopy.mdb"
  6. Application("Oracle_HR")= "DSN=Oracle_HLTP;User ID=myUID;Password=myPWD;"
  7. Oradb.Open Application("Oracle_HR")
  8. OraRec.Open "select * from EMPMASTER", Oradb
  9. AccDb.Open Application("EmpMasterAccessDB")
  10. Do While Not OraRec.EOF
  11. If IsNull(OraRec("CURHIREDATE")) = False Then 
  12. sqlupdate = sqlupdate & "CurrentHiredate="
  13. sqlupdate = sqlupdate & "'"& OraRec("CURHIREDATE") &"'" &", " 
  14. orarec.MoveNext
  15. else
  16. Response.Write "NULL"
  17. orarec.MoveNext
  18. End If
  19. loop
  20. AccDb.Close
Dec 6 '07 #1
1 1209
jhardman
3,406 Expert 2GB
what does this give you:
Expand|Select|Wrap|Line Numbers
  1. response.write OraRec("CURHIREDATE")
Jared
Dec 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: James Foreman | last post by:
I'm building a revenue management tool and this requires some understanding of how good my forecast accuracy is. Therefore I'm trying to collect the mean absolute percentage error (MAPE) on a...
5
by: Lars-Erik Aabech | last post by:
Hi! Guess it's my day again.. Tried to deploy a test release of a new asp.net web today, and got a terrible error. The web is running swell on three development computers, but when it's copied...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
4
by: DHS1 | last post by:
Hey guys. I have a lab that is due in two weeks, but I wanted to start on it now. Problem is, I'm at home during christmas break so I can't ask my professors. Here's my problem: I am given a very...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.