I want use Inner Join link 2 table and display in a datagridview. For example, PDC_FG Table contain PONO,Customer Customer Table contain Customer, Zone 2 table has same field is Customer. [CODE]ConnectionStringSettings conSettings = ConfigurationManager.ConnectionStrings["MyDBConnectionString"]; string name = conSettings.ProviderName; string providerName = conSettings.ProviderName; string ConnectionString = conSettings.ConnectionString; string sql = "SELECT PDC.PONO,PDC.Customer,Customer.Zone From PDC INNER JOIN Customer WHERE PDC.Customer=Customer.Customer"; OleDbConnection connection = new OleDbConnection(ConnectionString); connection.Open(); sCommand = new OleDbCommand(sql, connection); sAdapter = new OleDbDataAdapter(sCommand); sBuilder = new OleDbCommandBuilder(sAdapter); sDs = new DataSet(); sAdapter.Fill(sDs, "PDC_FG"); sTable = sDs.Tables["PDC_FG"]; connection.Close(); dataGridView1.DataSource = sDs.Tables["PDC_FG"]; dataGridView1.ReadOnly = true; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;[/CODE] These code cannot …

Member Avatar
Member Avatar
+0 forum 6

Who know how to let winForms C# access SQL database through internet.

Member Avatar
Member Avatar
+0 forum 1

my record got OrderFormNo and CashBillNo.(one to one insert) if 1st record OrderFormNo is 123 and CashBillNo is ABC, if 2nd record also same OrderFormNo, the CashBill must be same. As a result, I want detect if got same OrderFormNo in database but different CashBillNo, will not insert to database.

Member Avatar
Member Avatar
+0 forum 8

I got a datagridview, record daily water meter. so I want minus today record with yesterday 1 and get using how many meter of water. Refer attachment will clearly to know. ![untitled16](/attachments/large/3/untitled16.JPG "untitled16")

Member Avatar
Member Avatar
+0 forum 1

I got a datgridview. I add 1 more column to get difference of Meter 2 and meter 1. private void Loads() { ConnectionStringSettings conSettings = ConfigurationManager.ConnectionStrings["MyDBConnectionString"]; string name = conSettings.ProviderName; string providerName = conSettings.ProviderName; string ConnectionString = conSettings.ConnectionString; string sql = "SELECT * FROM WaterRecord Order by RecordID DESC"; SqlConnection connection = new SqlConnection(ConnectionString); connection.Open(); sCommand = new SqlCommand(sql, connection); sAdapter = new SqlDataAdapter(sCommand); sBuilder = new SqlCommandBuilder(sAdapter); sDs = new DataSet(); sAdapter.Fill(sDs, "WaterRecord"); sTable = sDs.Tables["WaterRecord"]; connection.Close(); dataGridView1.DataSource = sDs.Tables["WaterRecord"]; dataGridView1.ReadOnly = true; dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; txtNote.Text = ""; }

Member Avatar
Member Avatar
+0 forum 1

I want display username in MDIParent form after login. Who can teach me and give coding to me. Hope every expert help me.

Member Avatar
Member Avatar
+0 forum 8

I want pop out a confirm message box like Response.Write("<Script>confirm('Are you sure???');</Script>"); But I want control if Ok then do wat else do wat.

Member Avatar
Member Avatar
+0 forum 1

I have a gridview contain 3 record, when I use OleDbDataReader to verify the record is match with data in other Table in access. My problem is if the record is no match, I will end process and do not perform insert. But when 1st record is match and 2nd no match, the 1st will insert to database and 2nd will stop.But I is either 1 record no match will stop and no record will insert to database. C# program

Member Avatar
Member Avatar
+0 forum 3

When I select few records from datagridview and insert into access database. First selected record will last insert into database and last selected records will insert first. I got give a number to each record. For example, I got 3 items. When I select this 3 items and insert to database, the last item will get number 1 and first item will get number 3. How can I let first item get number 1, second item get number 2 and so on.

Member Avatar
Member Avatar
+0 forum 2

I want display 1 record become 4 record for print label purpose. For Example, Model A quantity is 100 pcs, every package only can 25pcs. so I want display as attach picture in datagridview in C#. quantity records is based on Quantity / ItemPerPackage.

Member Avatar
Member Avatar
+0 forum 3

I want user key in CAPITAL LETTER in combobox and textbox

Member Avatar
Member Avatar
+0 forum 1

I want generate a auto number in asp.net which must start as Cust. For example Cust/00001

Member Avatar
Member Avatar
+0 forum 2

I want detect duplicate row for certain column in datagridview and highlight the row.

Member Avatar
Member Avatar
+0 forum 3

I wan develop a program which is detect database got new record, then it will pop out message such as MSN login & logout status at right hand side below. or detect record status and pop out message box to tell user

Member Avatar
Member Avatar
+0 forum 1

I want develop a asp.net C# web application. I put it in IIS. Now I want make some security function in address bar. For example, I don't want let user skip login page and key in path directly.

Member Avatar
Member Avatar
+0 forum 1

I want get smaller number of Qty from select record in datagridview. after that insert to another Table. For Example, datagridview A got 5 record with same PONO, when I move these record to datagridview B, they will become a summary record and 5 records become 1 record. like picture below. When record display in datagridview B, the Qyt must be smaller 1. [CODE]private void timerFactoryOld_Tick(object sender, EventArgs e) { SqlCommand cmdCheckID1; SqlDataReader dtrCheckID1; foreach (DataGridViewRow r in dataGridView1.SelectedRows) { string PONO = r.Cells[1].Value.ToString(); string DeliveryDate = r.Cells[2].Value.ToString(); string Customer = r.Cells[3].Value.ToString(); string Name = r.Cells[4].Value.ToString(); string Item = r.Cells[5].Value.ToString(); …

Member Avatar
Member Avatar
+0 forum 1

I want to set text file location in app.config Something like these(below code is use to store database location) [CODE]<?xml version="1.0"?> <configuration> <configSections> </configSections> <connectionStrings> <add name="MyDBConnectionString" connectionString="Data Source=LIANPIAU\SQLEXPRESS;Initial Catalog=DiningChair;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="MyDBConnectionString_PO" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;\\Shlim\wansern prog\PODiningA.mdb&quot;" providerName="System.Data.OleDb" /> <add name="MyDBConnectionString_Loading" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;C:\LorryBook.mdb&quot;" providerName="System.Data.OleDb" /> <add name="MyDBConnectionString_ReportSystem" connectionString="Data Source=SHLIM;Initial Catalog=Report;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="DiningMould" connectionString="Data Source=SHLIM;Initial Catalog=DiningMould;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="MyDBConnectionString_Access" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;\\Wdsharespace\Wansern_System\Wansern_Foam\Instyle Sofa\Instyle_Sofa.mdb&quot;" providerName="System.Data.OleDb" /> <add name="EventLog" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;\\Wdsharespace\Wansern_System\Wansern_Foam\Instyle Sofa\Event_Log\Log.txt&quot;" providerName="System.Data.OleDb" /> </connectionStrings> <system.windows.forms jitDebugging="true"/> </configuration>[/CODE] so that I call the location to use [CODE]<?xml version="1.0"?> <configuration> <configSections> </configSections> <connectionStrings> <add name="MyDBConnectionString" connectionString="Data Source=LIANPIAU\SQLEXPRESS;Initial Catalog=DiningChair;Integrated Security=True" …

Member Avatar
+0 forum 0

I want write a text file event log. but when i want add second record(from datagridview) to text file, it will replace 1 record. [CODE]private void btnAddGoods_Click(object sender, EventArgs e) { SqlCommand cmdCheckID; SqlDataReader dtrCheckID; foreach (DataGridViewRow r in dataGridView1.SelectedRows) { string PONO = r.Cells[0].Value.ToString(); string DeliveryDate = r.Cells[1].Value.ToString(); string Customer = r.Cells[2].Value.ToString(); string Name = r.Cells[3].Value.ToString(); string Item = r.Cells[4].Value.ToString(); string Model = r.Cells[5].Value.ToString(); string FGrade = r.Cells[6].Value.ToString(); string Thk = r.Cells[7].Value.ToString(); string T_Unit = r.Cells[8].Value.ToString(); string Width = r.Cells[9].Value.ToString(); string W_Unit = r.Cells[10].Value.ToString(); string Length = r.Cells[11].Value.ToString(); string L_Unit = r.Cells[12].Value.ToString(); string Qty = r.Cells[13].Value.ToString(); string StockIn = …

Member Avatar
Member Avatar
+0 forum 3

Hello! any expert can help me. Please. I'm design a form with click Search button to search date and display data in datagridview. but when I set my access database OTDate column as Date, It will cause data mismatch problem. however, set OTDate column as Text is fine. But it will difficult when make crystal report sorting by month or year. my date format is short date time. dd/MMM/yy this is code: [code] private void btnSearch_Click(object sender, EventArgs e) { string sql= "SELECT * FROM OT where OTDate ='" + dtpDate.Text + "'"; OleDbConnection connection = new OleDbConnection(ConnectionString); connection.Open(); sCommand …

Member Avatar
Member Avatar
+0 forum 8

I want let exe detect new version of exe. Then it will update itself. my program is develop in Microsoft Visual Studio 2008 C# windows form application.

Member Avatar
Member Avatar
+0 forum 1

I develop a cash bill system. when a salesman have more than 2 order no paid, then cannot insert order. (1 order can contain many item, if in database can have same order no. but different product). database field : - name(text), paid(boolean),orderNo(text).and so on ...

Member Avatar
Member Avatar
+0 forum 1

Who know how to implement Mesh Topology, actually is want implement backup link. if 1 link is fail, another still can working.But I think implement in normal switch. (no in Cisco switch)

Member Avatar
Member Avatar
+0 forum 1

I want select rows from datagridview and insert into another Table(give the table : Label) Now my problem is this datagridview contain columns quantity and ItemPerPackage. Quantity column is Total quantity for this item and ItemPerPackage is 1 package can contain how many quantity. therefore, I want this 1 record insert to Label Table become multiple record. eg. Quantity is 52 and ItemPerPackage is 10. So it must has 6 records and every record quantity is 10 except last record is 2. I do like this is want print label for paste at item. my Insert code is like this …

Member Avatar
Member Avatar
+0 forum 2

I'm want to join 2 table from access database and Microsoft SQL Server 2008 In microsoft visual studio 2008. Display join data in datagridview.

Member Avatar
Member Avatar
+0 forum 2

I want compare 2 datagridview table for calculation purpose. This is because this 2 table is come from different database. 1 is access and 1 is sql server. therefore I cannot join table.So I have 3 datagridview table to display data. I'm want datagridview3 ItemPerPack Column * datagridview1 Qty when they add to next table. datagridview2 is for select item purpose.when user key in PONO,qty and select item in datagridview2. then this detail will add into datagridview1 [CODE]//display data into datagridview3 from Microsoft SQl server 2008. //This table column are FGrade,Thk,Width,Length,ItemPerPack private void Form1_Load(object sender, EventArgs e) { ConnectionStringSettings conSettings …

Member Avatar
+0 forum 0

I'm want datagridview display numeric only for certain column. eg: column is store length. data will display 25mm. Now I'm want show 25 only in datagridview column.

Member Avatar
Member Avatar
+0 forum 2

I'm making a datagridview, inside datagridview got many columns. 1 of column name is Finished(checkbox). When load form, the system will detect Finished is Checked and display color. But when I click column header to sort, it will not display color. So how I set color command in column header in datagridview?

Member Avatar
Member Avatar
+0 forum 3

I want make the installer for free try 30 days. after 30days disable the function of program. so I'm want to get user install date + 30days to get expire day. When user key in license key, then can use program. As a result, how can I get the install date and how to detect license is valid??? Or any expert got any suggestion?>>

Member Avatar
Member Avatar
+0 forum 3

The problem is Red color there. when add record into table. I want have same LoadingNo but different RecNo. But I'm using this only can add record until 2 only. Expert please help me!! [CODE]private string CalculateNewRecordNumber(string record) { string[] data = record.Split('/'); DateTime currentDate = DateTime.Today; int recordYear = int.Parse(data[0]); recordYear = int.Parse("20" + recordYear); int recordMonth = int.Parse(data[1]); if (currentDate.Year == recordYear) { if (currentDate.Month == recordMonth) { //year and month are the same, we only have to increment the number: int number = int.Parse(data[2]); //do the increment of the record number: number++; //create new record: record = …

Member Avatar
Member Avatar
+0 forum 14

I want generate auto number format like year/month/4digit number eg:11/04/0001 2. I want read the database find last number and let number auto + 1 to generate new number

Member Avatar
Member Avatar
+0 forum 10

The End.