Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dump View data in a table

(0) ShareShare
ReportReport
Posted on by 795

Hi,

I have a view with some fields and i want to dump the whole data of all those fields from a view in a SQL table for the fields correspondingly mapped to it.How to start with it using C#?

Thanks for any help!

*This post is locked for comments

  • CRM Beginner  Profile Picture
    CRM Beginner 795 on at
    RE: Dump View data in a table

    Sir, my requirement is to dump view data kept in a remote server to my local db table  with the help of SQL script..Can't do using Excel export . Can you help for establishing connection between two servers?

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Dump View data in a table

    According to my understanding, you want to Dump data from CRM to your MS sql, If my understanding is correct.. please follow below step

    1) Go to the view for which you want to dump data Export that file in excel

    2) And step by step follow the below link, it will help you in dumping data into MS sql database

    https://solutioncenter.apexsql.com/how-to-import-and-export-sql-server-data-to-an-excel-file/

    Thanks,

    Shahbaaz

  • CRM Beginner  Profile Picture
    CRM Beginner 795 on at
    RE: Dump View data in a table

    Can you please elp me from scratch that if i don't know anything about SQL jobs, how do i write a SQL job ?

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Dump View data in a table

    Hi,

    Make sure your both the connection string name are different also check below link .

    stackoverflow.com/.../multiple-sql-server-connection-strings-in-app-config-file

    www.codeproject.com/.../How-to-get-Connection-String-from-App-Config-in-Cs

    If it don't resolve your issue post your app config file.

    Thanks,

    Shahbaaz

  • CRM Beginner  Profile Picture
    CRM Beginner 795 on at
    RE: Dump View data in a table

    Sir, can you help me out for one doubt->

    I am using two connectionStrings in my app.Config .

    1. From where data is retrieved 2. To where i ant to save the retrieved data

    Then , always its pointing to a single connectionString.How do i specify when to point to where? That's y i am getting Invalid objects

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Dump View data in a table

    Please check below link,

    stackoverflow.com/.../sql-server-invalid-object-name-but-tables-are-listed-in-ssms-tables-list

    if you solved the problem thanks to an answer,

    please mark it as verified to encourage the community to provide more and more a better support.

    Thank you.

    Shahbaaz

  • CRM Beginner  Profile Picture
    CRM Beginner 795 on at
    RE: Dump View data in a table

    Thanks ..One more doubt..If i am able to retrieve view data using C# code and gave two connectionstrings -> one for retrieving data from one server and one of where we want to store that retrieved data.

    But, now i am getting "Invalid Object Name: table_name"

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Dump View data in a table

    Also you don't require any code in this.

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Dump View data in a table

    Hi,

    You can export that view in excel file and than you can import that excel file into your SQL database.

    check below link to import data into database

    www.mssqltips.com/.../simple-way-to-import-data-into-sql-server

    docs.microsoft.com/.../import-data-from-excel-to-sql

    Thanks,

    Shahbaaz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,399 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans