I solved the problem. Thank you a lot. I used the nested BEGIN and END between two tables. Cheers.
dr_iton
Posts
-
Need Help in SQL Server "Stored Procedure" -
Need Help in SQL Server "Stored Procedure"I know how to make a Stored Procedure that its data affect in one TABLE. The problem is that I'm making a three tier project, and I'm inserting, Updating Reading and Deleting data to tables using Stored Procedure. My question is, how to make a tored procedure that its data are affecting two tables? For example. TABLE1 has coulmns Name and Age, and TABLE2 has columns Year and Time. How to programm one procedure using parameters of two tables. P.S. Is it possible to create a procedure that its data can be stored in two tables? Thank you in advance for your time.
-
How to solve the following problem using StreamReader.OK, my Form2 is named GjendjaForm, and after I rename Form2 with GjendjaForm it shows me the following errors. GjendjaForm.emriBox is inaccessible due to its protection level GjendjaForm.mbiemriBox is inaccessible due to its protection level GjendjaForm.xhirollogariaBox is inaccessible due to its protection level also it says that: Error 3 An object reference is required for the non-static field, method, or property 'LlogariaBankare.GjendjaForm.mbiemriBox' C:\Users\Driton Gashi\Documents\Visual Studio 2008\Projects\LlogariaBankare\LlogariaBankare\KlientetForm.cs 112 17 LlogariaBankare
-
How to solve the following problem using StreamReader.I created a method to show the items in ListBox in Form 1, like this
string linjaListBox = this.ListBox.SelectedItem.ToString();
string emriPjesa = linjaListBox.Split('\\t')\[0\]; string mbiemriPjesa = linjaListBox.Split('\\t')\[1\]; string datelindjaPjesa = linjaListBox.Split('\\t')\[2\]; string vendlindjaPjesa = linjaListBox.Split('\\t')\[3\]; string xhirollogariaPjesa = linjaListBox.Split('\\t')\[4\]; this.emriBox.Text = emriPjesa; this.mbiemriBox.Text = mbiemriPjesa; this.datelindjaBox.Text = datelindjaPjesa; this.vendlindjaBox.Text = vendlindjaPjesa; this.xhirollogariaBox.Text = xhirollogariaPjesa; indeksLista = Convert.ToInt32(ListBox.SelectedIndex.ToString());
In the next form I used three of TextBoxes from first Form such as emriBox,mbiemriBox and xhirollogariaBox. How to show the text in those three TextBoxes in form2 if I select a row in ListBox from Form1.
-
How to solve the following problem using StreamReader.After all I have the following problem. I can remove the lines from listbox, but those lines are not deleted from text file, how to delete a specific line from a text file. Cheers in advance for your reply.
-
How to solve the following problem using StreamReader.OK, now i konw how to read a text file and put it in a listbox, but the problem is that when I type a new line it doesn't show me that new line in Listbox until i debug again the form. I solved the problem creating a method on form load. Do I need to create a new method to reload the text file again or what ever. Cheers in advance for your reply.
-
How to solve the following problem using StreamReader.I have a problem reading lines and showing them from a text file in a ListBox using Windows Form Application. I made some code but now I'm stucked in a place where I made a comment.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;namespace LlogariaBankare
{
public partial class KlientForm : Form
{
public string pathi = "Klientet.txt";
public KlientForm()
{
InitializeComponent();
}private void KlientForm\_Load(object sender, EventArgs e) { this.ShtoButon.Enabled = true; this.AzhuroButon.Enabled = false; this.FshijButon.Enabled = false; } private void ShtoButon\_Click(object sender, EventArgs e) { StreamWriter swKlientet = new StreamWriter(pathi, true); swKlientet.WriteLine(emriBox.Text + "\\t" + mbiemriBox.Text + "\\t" + datelindjaBox.Text + "\\t" + vendlindjaBox.Text + "\\t" + xhirollogariaBox.Text + "\\t"); swKlientet.Close(); } private void ListBox\_SelectedIndexChanged(object sender, EventArgs e) { /\* what code i have to write here to read lines from text file and show the lines here\*/ } }
}
-
Need help to show text lines from .txt file in listboxI got the point now. If I can not post a solution tonight because I'll be busy, tomorrow I'll tell you if I solved my problem. Once again thank you for your reply. Cheers.
-
Need help to show text lines from .txt file in listboxSo you are saying that I nedd to create a text file only once, and after that i can manipulate with file details in my form calling them. Am I right or...
-
Need help to show text lines from .txt file in listboxYes, I want that my listbox has to show every line from text file, and also, I don't want that to get lost.
-
Need help to show text lines from .txt file in listboxI created a text file using StreamWriter in a Form Application. I can't put a code to show the lines from a text file in a listbox. How to fix this problem.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;namespace AplikacioniStudentet
{
public partial class FormaStudentet : Form
{
public FormaStudentet()
{
InitializeComponent();} private void Form1\_Load(object sender, EventArgs e) { } private void textBoxID\_TextChanged(object sender, EventArgs e) { string pathi = "Studentet.txt"; using (FileStream fs = new FileStream(pathi, FileMode.Create)) { using (StreamWriter sw = new StreamWriter(fs)) { foreach (string line in textBoxID.Lines) sw.Write(line + sw.NewLine); sw.Close(); } } } private void button1\_Click(object sender, EventArgs e) { string pathi = "Studentet.txt"; using (FileStream fs = new FileStream(pathi, FileMode.Create)) { using (StreamWriter sw = new StreamWriter(fs)) { sw.WriteLine(textBoxID.Text + " " + textBoxEmri.Text + " " + textBoxMbiemri.Text + " "); sw.Flush(); sw.Close(); } } /\*TextWriter tw = new StreamWriter (pathi, true); tw.ID = ID; tw.emri = emri; tw.mbiemri = mbiemri; tw.Close();\*/ } private void textBoxEmri\_TextChanged(object sender, EventArgs e) { string pathi = "Studentet.txt"; using (FileStream fs = new FileStream(pathi, FileMode.Create)) { using (StreamWriter sw = new StreamWriter(fs)) { foreach (string line in textBoxEmri.Lines) sw.Write(line + sw.NewLine); sw.Close(); } } } private void textBoxMbiemri\_TextChanged(object sender, EventArgs e) { string pathi = "Studentet.txt";