Hi
i want to transfer data from sql server to access .Is it possible if yes then
give some idea how i will transfer
i did this by connecting with sql server and access data in sql recordset and also open msaccess database but after that i am getting confused
am i going right
please give some idea
8 2243
Yes, you have to use store procedure in Sqlserver database and call it from frontend.
Below Query will explain about insert to MS Access database - INSERT INTO OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
-
'Data Source="C:\DB1.MDB ";User ID=Admin;Password=;')...MSAccessTableName (field1, field2, field3)
-
SELECT field1, field2, field3
-
FROM SqlServerTableName
(I think this should move to Sql Server!)
Hi
i use the following query
sQuery = "insert INTO OpenDataSource( 'Microsoft.Jet. OLEDB.4.0;Data Source='D:\Upda tion\YpUpDate_P erformace.mdb'; ')Ypupdate(PgNm br,Yp1EOp,Yp1VO p,Yp1EStartTime ,Yp1EEndTime,Yp 1VStartTime,Yp1 VEndTime,Oks,Cr opImgType)selec t * from Ypdata"
Ypupdate is mdb table name and ypudate is sql table name
but this is showing incorrect systax near D:\
please check and correct this code
Yes, you have to use store procedure in Sqlserver database and call it from frontend.
Below Query will explain about insert to MS Access database - INSERT INTO OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
-
'Data Source="C:\DB1.MDB ";User ID=Admin;Password=;')...MSAccessTableName (field1, field2, field3)
-
SELECT field1, field2, field3
-
FROM SqlServerTableName
(I think this should move to Sql Server!)
you need to open two connection string one each for the database.
fetch record from sql server and insert the same into msaccess.
You have to try your self (do not let me to check.)
Syntax: Insert Into OpenDataSource(
'Microsoft.Jet. OLEDB.4.0' (-> Oledb Jet connector to MS Access) ,
'Data Source=D:\Updat ion\YpUpDate_Pe rformace.mdb;Us er ID=Admin;Passwo rd=;')(-> Open database with username and password) ...Ypupdate (-> triple dot tablename to open table) (f1, f2,f3,f4…) are fields
Usual select query to insert in the access table.
Change your query and debug it yourself. - insert INTO OpenDataSource('Microsoft.Jet.OLEDB.4.0', 'Data Source=D:\Updation\YpUpDate_Performace.mdb;User ID=Admin;Password=;')...Ypupdate
-
(PgNmbr,Yp1EOp,Yp1VOp,Yp1EStartTime,Yp1EEndTime,Yp1VStartTime,Yp1VEndTime,Oks,CropImgType)
-
select * from Ypdata
All the best.
Hi
thanks for reply it works and transfer data but when i executes the program by putting break point all the data transfer which i want yes, and filter the data according to my conditions in other tables it all works fine during break points and
when i execute the program without break point it is not transfering all data and not filtering the data and insert into other tables which has worked fine during breakpoints
can you tell me what is wrong if you want my coding the please write me
thanks in advance
varinder
You have to try your self (do not let me to check.)
Syntax: Insert Into OpenDataSource(
'Microsoft.Jet. OLEDB.4.0' (-> Oledb Jet connector to MS Access) ,
'Data Source=D:\Updat ion\YpUpDate_Pe rformace.mdb;Us er ID=Admin;Passwo rd=;')(-> Open database with username and password) ...Ypupdate (-> triple dot tablename to open table) (f1, f2,f3,f4…) are fields
Usual select query to insert in the access table.
Change your query and debug it yourself. - insert INTO OpenDataSource('Microsoft.Jet.OLEDB.4.0', 'Data Source=D:\Updation\YpUpDate_Performace.mdb;User ID=Admin;Password=;')...Ypupdate
-
(PgNmbr,Yp1EOp,Yp1VOp,Yp1EStartTime,Yp1EEndTime,Yp1VStartTime,Yp1VEndTime,Oks,CropImgType)
-
select * from Ypdata
All the best.
there i said, better use store procedure to do all the data updates and call from front-end.
Hi
Thanks For reply
but can you give me some example
pleeeeeeeeeeeee eez
there i said, better use store procedure to do all the data updates and call from front-end.
In sql server, select new storeprocedure -
Create Procdure ProcedureName
-
Begin Tran
-
insert INTO OpenDataSource('Microsoft.Jet.OLEDB.4.0', 'Data Source=D:\Updation\YpUpDate_Performace.mdb;User ID=Admin;Password=;')...Ypupdate
-
(PgNmbr,Yp1EOp,Yp1VOp,Yp1EStartTime,Yp1EEndTime,Yp 1VStartTime,Yp1VEndTime,Oks,CropImgType)
-
select * from Ypdata
-
-
IF(@@Error != 0)
-
Begin
-
Rollback
-
End
-
commet
-
and call it from front end..like - connection.Execute ("ProcedureName()")
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Andy Davis |
last post by:
Has anybody tried and had any success exporting data directly from ACT! 2000
to an Access database? I need to transfer data from ACT! to Access, but the
data is all imported as text, including date and number fields. If I
transfer it to EXCEL first and then to Access, it is imported to Access in
the correct format. Would like to know if there is an easier or quicker
method of doing the transfer to Access?
Regards and thanks in advance
...
|
by: cfyam |
last post by:
How can I transfer Excel data to Sql Server?
|
by: Alexander Bosch |
last post by:
Hi,
I'm having a problem similar to the one that's stated in this KB
http://support.microsoft.com/default.aspx?scid=kb;en-us;839521
When I'm posting a page to itself with the bool value as true it falls into
an infinite loop and later a StackOverflow Exception. I need to do this and
not a Response.Redirect or a transfer with the bool in false.
My problem is that this KB is saying that this problem should be solved with
ServicePack 1 of...
|
by: scoopthis |
last post by:
Hi,
I have an application where I transfer an excel file to a table on SQL through an adp file. The excel file does change so I pass the name parameter from a cmd line. The excel file has a specific range defined of 20,000 records. Currently the process is using ac.DoCmd.TransferSpreadsheet acImport and it pulls in all 30,000 records even though there isn't data in all 20,000 records (lots of nulls). How can I get the process to only transfer...
|
by: hmiller |
last post by:
Hey there folks:
I have been trying to get this work for about a week now. I'm new to
VBA...
I am trying to transfer a populated table in Access to an existing, but
blank, Excel worksheet. I have seen methods for transfering cell by
cell, and understand how to get that to work. However, my recordset has
3600 cells of data. Cell by cell is just not an option. I am looking
for a way to specify the starting cell (most upper left cell) in...
| |
by: JohnM |
last post by:
I can transfer from a query with
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "Filenam",
CPath, True
I would like to use a form for the user to select and order data then export
th result. How do I set about this?
|
by: sachin shah |
last post by:
Hi All,
1. i want to transfer the .csv file data into sql server table, i
tried with the DTS but while creating DSN it not prompt to attech
the .csv file. give me the proper steps to perform the data
transfer...
2. i want result of my query into excel or text file by using the sql
query( like Select * from employee where emp_salary>10000 to 'c:
\emp.xls).i know the other way right click into query analyzer window
|
by: is49460 |
last post by:
Good afternoon!
I use transfer spreadsheet function the export data from one of the table into the excel spreat sheet. I use the following code:
DoCmd.TransferSpreadsheet acExport, 8, "qry Rejected Items", Path & "Output Files\Rejected Items.xls", True, "NewData"
Please note that the output should be placed in the "NewData" tab.
In the same excel file the output was made to, i have function that is excecuted on open:
Sub Auto_Open()
|
by: =?Utf-8?B?Y2xhcmE=?= |
last post by:
Hi all,
I have some data in a worksheet and need to be transfered to a table in SQL
Server 2005 using VB 2005, the question is how can I manipulate the Excel
object model and access to the data in the worksheet.
Clara
thank you so much for your help
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |