Import data from database and textfile to a datagridviewProgrammatically choose the class to be instantiateProblem in saving image to database from picturebox. VB.Net 2008. Framework 3.5WPF import multiple txt filesHow to load the state of checkboxlist in database asp.net?Find duplicats and display in new datagridview using LinqDisplaying data from .txt file in separate rows in DataGridViewWant to delete DataGridView column with Access database columnHow to filter datagridview columnHow to 'Group By' values in a column in DataGridView in Vb.NetDisplay Data in DatagridView with condition

Does two puncture wounds mean venomous snake?

Acceptable to cut steak before searing?

Could one become a successful researcher by writing some really good papers while being outside academia?

Infeasibility in mathematical optimization models

sed delete all the words before a match

Drawing complex inscribed and circumscribed polygons in TikZ

What is a raycast?

How many different ways are there to checkmate in the early game?

How do we avoid CI-driven development...?

Optimal way to extract "positive part" of a multivariate polynomial

Team goes to lunch frequently, I do intermittent fasting but still want to socialize

Max Order of an Isogeny Class of Rational Elliptic Curves is 8?

Why are Gatwick's runways too close together?

Ordering a word list

The pronunciation of "protester"

Plausibility of Ice Eaters in the Arctic

How does The Fools Guild make its money?

As a 16 year old, how can I keep my money safe from my mother?

Am I overreacting to my team leader's unethical requests?

Why aren’t emergency services using callsigns?

Why doesn't the "ch" pronunciation rule occur for words such as "durch" and "manchmal"?

Ex-contractor published company source code and secrets online

Looking for a new job because of relocation - is it okay to tell the real reason?

Y2K... in 2019?



Import data from database and textfile to a datagridview


Programmatically choose the class to be instantiateProblem in saving image to database from picturebox. VB.Net 2008. Framework 3.5WPF import multiple txt filesHow to load the state of checkboxlist in database asp.net?Find duplicats and display in new datagridview using LinqDisplaying data from .txt file in separate rows in DataGridViewWant to delete DataGridView column with Access database columnHow to filter datagridview columnHow to 'Group By' values in a column in DataGridView in Vb.NetDisplay Data in DatagridView with condition






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















i want to import data from txt file and database to a datagridview like this
first and second columns from txtfile third from database fourth from txt file is simple as that
i can import from txtfile and i can import from database myproblem
how to mix them in datagridview
i need just any idea how it work
or how i import a data to just 2 first columns after that i make query to third column after i return to txtfile and complete fill the datagridview from txt file
its like all datagridview from txtfile but in middle i want to add a new columns for database query



 Dim ouvrir As New OpenFileDialog
If ouvrir.ShowDialog = DialogResult.OK Then
Dim sr As New StreamReader(ouvrir.FileName)
Dim cmd As New SqlCommand("select * from EntetedemandeI", cn)
Dim da As SqlDataReader = cmd.ExecuteReader
While Not sr.EndOfStream
DataGridView1.Rows.Add(sr.ReadLine.Split(CChar(vbTab)))
End While
While da.Read
DataGridView1.Rows.Add(da("Numero"))
End While
End If









share|improve this question


























  • I offered advice on how to do this elsewhere and you basically ignored it. The question is even less appropriate here because SO requires you to have a specific problem, which means you need to show what you've already tried. If you haven't tried anything then you don't have a specific problem but, rather, a need to research.

    – jmcilhinney
    Mar 27 at 8:00











  • Long code snippets are virtually unreadable in comments, especially unformatted. Please do some reading to learn how this site works, then edit your question to an acceptable standard. Start with this, this and this at a minimum.

    – jmcilhinney
    Mar 27 at 23:38











  • I'm not quite sure how but my previous comment does not contain what I intended. What I meant to say was that long code snippets are all but unreadable in comments, especially when unformatted. You should follow the three links I provided to learn a bit about how this site works and there's more in the Help Center besides, including information about formatting.

    – jmcilhinney
    Mar 28 at 7:33











  • OK, that's weird. My second comment looked corrupted so I posted my third comment but, as I submitted, I noticed that my second comment looked OK again. Not sure what's up with that.

    – jmcilhinney
    Mar 28 at 7:34











  • Note that I wasn't suggesting that you should format your code snippet in a comment but rather not post it in a comment at all. Edit your question to include all the relevant information that it should have included to begin with.

    – jmcilhinney
    Mar 28 at 7:35

















0















i want to import data from txt file and database to a datagridview like this
first and second columns from txtfile third from database fourth from txt file is simple as that
i can import from txtfile and i can import from database myproblem
how to mix them in datagridview
i need just any idea how it work
or how i import a data to just 2 first columns after that i make query to third column after i return to txtfile and complete fill the datagridview from txt file
its like all datagridview from txtfile but in middle i want to add a new columns for database query



 Dim ouvrir As New OpenFileDialog
If ouvrir.ShowDialog = DialogResult.OK Then
Dim sr As New StreamReader(ouvrir.FileName)
Dim cmd As New SqlCommand("select * from EntetedemandeI", cn)
Dim da As SqlDataReader = cmd.ExecuteReader
While Not sr.EndOfStream
DataGridView1.Rows.Add(sr.ReadLine.Split(CChar(vbTab)))
End While
While da.Read
DataGridView1.Rows.Add(da("Numero"))
End While
End If









share|improve this question


























  • I offered advice on how to do this elsewhere and you basically ignored it. The question is even less appropriate here because SO requires you to have a specific problem, which means you need to show what you've already tried. If you haven't tried anything then you don't have a specific problem but, rather, a need to research.

    – jmcilhinney
    Mar 27 at 8:00











  • Long code snippets are virtually unreadable in comments, especially unformatted. Please do some reading to learn how this site works, then edit your question to an acceptable standard. Start with this, this and this at a minimum.

    – jmcilhinney
    Mar 27 at 23:38











  • I'm not quite sure how but my previous comment does not contain what I intended. What I meant to say was that long code snippets are all but unreadable in comments, especially when unformatted. You should follow the three links I provided to learn a bit about how this site works and there's more in the Help Center besides, including information about formatting.

    – jmcilhinney
    Mar 28 at 7:33











  • OK, that's weird. My second comment looked corrupted so I posted my third comment but, as I submitted, I noticed that my second comment looked OK again. Not sure what's up with that.

    – jmcilhinney
    Mar 28 at 7:34











  • Note that I wasn't suggesting that you should format your code snippet in a comment but rather not post it in a comment at all. Edit your question to include all the relevant information that it should have included to begin with.

    – jmcilhinney
    Mar 28 at 7:35













0












0








0








i want to import data from txt file and database to a datagridview like this
first and second columns from txtfile third from database fourth from txt file is simple as that
i can import from txtfile and i can import from database myproblem
how to mix them in datagridview
i need just any idea how it work
or how i import a data to just 2 first columns after that i make query to third column after i return to txtfile and complete fill the datagridview from txt file
its like all datagridview from txtfile but in middle i want to add a new columns for database query



 Dim ouvrir As New OpenFileDialog
If ouvrir.ShowDialog = DialogResult.OK Then
Dim sr As New StreamReader(ouvrir.FileName)
Dim cmd As New SqlCommand("select * from EntetedemandeI", cn)
Dim da As SqlDataReader = cmd.ExecuteReader
While Not sr.EndOfStream
DataGridView1.Rows.Add(sr.ReadLine.Split(CChar(vbTab)))
End While
While da.Read
DataGridView1.Rows.Add(da("Numero"))
End While
End If









share|improve this question
















i want to import data from txt file and database to a datagridview like this
first and second columns from txtfile third from database fourth from txt file is simple as that
i can import from txtfile and i can import from database myproblem
how to mix them in datagridview
i need just any idea how it work
or how i import a data to just 2 first columns after that i make query to third column after i return to txtfile and complete fill the datagridview from txt file
its like all datagridview from txtfile but in middle i want to add a new columns for database query



 Dim ouvrir As New OpenFileDialog
If ouvrir.ShowDialog = DialogResult.OK Then
Dim sr As New StreamReader(ouvrir.FileName)
Dim cmd As New SqlCommand("select * from EntetedemandeI", cn)
Dim da As SqlDataReader = cmd.ExecuteReader
While Not sr.EndOfStream
DataGridView1.Rows.Add(sr.ReadLine.Split(CChar(vbTab)))
End While
While da.Read
DataGridView1.Rows.Add(da("Numero"))
End While
End If






vb.net






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 16:11









Mary

5,1132 gold badges11 silver badges22 bronze badges




5,1132 gold badges11 silver badges22 bronze badges










asked Mar 27 at 7:41









Mahjoubi houssemMahjoubi houssem

83 bronze badges




83 bronze badges















  • I offered advice on how to do this elsewhere and you basically ignored it. The question is even less appropriate here because SO requires you to have a specific problem, which means you need to show what you've already tried. If you haven't tried anything then you don't have a specific problem but, rather, a need to research.

    – jmcilhinney
    Mar 27 at 8:00











  • Long code snippets are virtually unreadable in comments, especially unformatted. Please do some reading to learn how this site works, then edit your question to an acceptable standard. Start with this, this and this at a minimum.

    – jmcilhinney
    Mar 27 at 23:38











  • I'm not quite sure how but my previous comment does not contain what I intended. What I meant to say was that long code snippets are all but unreadable in comments, especially when unformatted. You should follow the three links I provided to learn a bit about how this site works and there's more in the Help Center besides, including information about formatting.

    – jmcilhinney
    Mar 28 at 7:33











  • OK, that's weird. My second comment looked corrupted so I posted my third comment but, as I submitted, I noticed that my second comment looked OK again. Not sure what's up with that.

    – jmcilhinney
    Mar 28 at 7:34











  • Note that I wasn't suggesting that you should format your code snippet in a comment but rather not post it in a comment at all. Edit your question to include all the relevant information that it should have included to begin with.

    – jmcilhinney
    Mar 28 at 7:35

















  • I offered advice on how to do this elsewhere and you basically ignored it. The question is even less appropriate here because SO requires you to have a specific problem, which means you need to show what you've already tried. If you haven't tried anything then you don't have a specific problem but, rather, a need to research.

    – jmcilhinney
    Mar 27 at 8:00











  • Long code snippets are virtually unreadable in comments, especially unformatted. Please do some reading to learn how this site works, then edit your question to an acceptable standard. Start with this, this and this at a minimum.

    – jmcilhinney
    Mar 27 at 23:38











  • I'm not quite sure how but my previous comment does not contain what I intended. What I meant to say was that long code snippets are all but unreadable in comments, especially when unformatted. You should follow the three links I provided to learn a bit about how this site works and there's more in the Help Center besides, including information about formatting.

    – jmcilhinney
    Mar 28 at 7:33











  • OK, that's weird. My second comment looked corrupted so I posted my third comment but, as I submitted, I noticed that my second comment looked OK again. Not sure what's up with that.

    – jmcilhinney
    Mar 28 at 7:34











  • Note that I wasn't suggesting that you should format your code snippet in a comment but rather not post it in a comment at all. Edit your question to include all the relevant information that it should have included to begin with.

    – jmcilhinney
    Mar 28 at 7:35
















I offered advice on how to do this elsewhere and you basically ignored it. The question is even less appropriate here because SO requires you to have a specific problem, which means you need to show what you've already tried. If you haven't tried anything then you don't have a specific problem but, rather, a need to research.

– jmcilhinney
Mar 27 at 8:00





I offered advice on how to do this elsewhere and you basically ignored it. The question is even less appropriate here because SO requires you to have a specific problem, which means you need to show what you've already tried. If you haven't tried anything then you don't have a specific problem but, rather, a need to research.

– jmcilhinney
Mar 27 at 8:00













Long code snippets are virtually unreadable in comments, especially unformatted. Please do some reading to learn how this site works, then edit your question to an acceptable standard. Start with this, this and this at a minimum.

– jmcilhinney
Mar 27 at 23:38





Long code snippets are virtually unreadable in comments, especially unformatted. Please do some reading to learn how this site works, then edit your question to an acceptable standard. Start with this, this and this at a minimum.

– jmcilhinney
Mar 27 at 23:38













I'm not quite sure how but my previous comment does not contain what I intended. What I meant to say was that long code snippets are all but unreadable in comments, especially when unformatted. You should follow the three links I provided to learn a bit about how this site works and there's more in the Help Center besides, including information about formatting.

– jmcilhinney
Mar 28 at 7:33





I'm not quite sure how but my previous comment does not contain what I intended. What I meant to say was that long code snippets are all but unreadable in comments, especially when unformatted. You should follow the three links I provided to learn a bit about how this site works and there's more in the Help Center besides, including information about formatting.

– jmcilhinney
Mar 28 at 7:33













OK, that's weird. My second comment looked corrupted so I posted my third comment but, as I submitted, I noticed that my second comment looked OK again. Not sure what's up with that.

– jmcilhinney
Mar 28 at 7:34





OK, that's weird. My second comment looked corrupted so I posted my third comment but, as I submitted, I noticed that my second comment looked OK again. Not sure what's up with that.

– jmcilhinney
Mar 28 at 7:34













Note that I wasn't suggesting that you should format your code snippet in a comment but rather not post it in a comment at all. Edit your question to include all the relevant information that it should have included to begin with.

– jmcilhinney
Mar 28 at 7:35





Note that I wasn't suggesting that you should format your code snippet in a comment but rather not post it in a comment at all. Edit your question to include all the relevant information that it should have included to begin with.

– jmcilhinney
Mar 28 at 7:35












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55372045%2fimport-data-from-database-and-textfile-to-a-datagridview%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55372045%2fimport-data-from-database-and-textfile-to-a-datagridview%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript