I want to copy data from one table in Oracle to one table in access.
So to do this i m reading data from my oracle table & using while loop for each record i am copying data to access table.
I am using insert query.Here is my insert query
Qryaccess.SQL = "Insert into mytable(field1) Values ('"&Qryoracle.FieldByName("field1").AsString&a mp;"')"
Qryaccess is for access DB
& Qryoracle is for oracle DB
Using the above insert query i am facing some problem & data is not getting into my access DB.
Can any one help me in this????
Just at a glance without trying it out it looks like something with your string contatenation. There's a set of double quotes around field1 in your Values clase that may be throwing things off. Might I suggest something like:
InsertValue = Qryoracle.FieldByName("field1").AsString
Qryaccess.SQL = "Insert into mytable(field1) Values ('"&InsertValue&"')"
While it's an additional line of code, makes figuring out how to get those strings to concatenate with all those quotes and such.