2,634 Topics
![]() | |
I want to filter data from a billno to crystal report this the coding i used Dim connectionstring As String = Module1.connectionString Dim sqlconn As New SqlConnection(connectionstring) Public sqlDataset As New DataSet Dim myCommand1 As SqlCommand Dim myCommand2 As SqlCommand Public dr As SqlDataReader Dim myConnection As SqlConnection Dim nxtmajor … | |
Hi guys i have this code which insert the data in the textbox Dim FilePath As String = "C:\Users\ezekiels\Desktop\New Folder\EBU 6.mdb" Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & FilePath & "") conn.Open() Dim myadapter As New OleDbDataAdapter("SELECT * FROM Table_EBU6", conn) Dim dtset As New DataSet myadapter.Fill(dtset) myadapter.Dispose() Dim table … | |
Hi, I have an error with this function at runtime Private Sub adultPay() sql = "SELECT adultRate FROM roomType WHERE roomType = " & rumType.ToString & "" connectDatabase() Using da As New OleDb.OleDbDataAdapter(sql, con) Using ds As New DataSet Try da.Fill(ds, "AdultRate") 'error here Dim adultRate As String = ds.Tables("AdultRate").Rows(0).Item(0).ToString … | |
1) On the page_load event, Bind the dropdownlist to a database using SqlConnection conn = new SqlConnection("blablabla"); SqlDataAdapter ddAdapter = new SqlDataAdapter("SELECT * FROM products", conn); DataSet ds = new DataSet(); ddAdapter.Fill(ds); 2) On the DropDownList1_selectedIndexChanged, - When user select a value (the productName) from the dropdownlist - All the … | |
Hi All I am currently using a Dataset in my program to load data from a SQL database. when i open my form, i am using a Me.Tbl_CustomersTableAdapter.FillBy(Me.MydatabaseDataSet.tbl_Customers, ID) to load the data, which i then bind into the textboxes on the form. I would like to know if there … | |
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.Data.SqlClient; namespace testingdatabase { public partial class Form3 : Form { public Form3() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { new Form1().Show(); this.Close(); } private void text_searchstring_TextChanged(object sender, EventArgs e) … | |
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.Data.SqlClient; namespace Dbconnection { public partial class Form1 : Form { public Form1() { InitializeComponent(); } SqlDataAdapter da; SqlConnection con; DataSet ds1; private void Form1_Load(object sender, EventArgs e) { con = new SqlConnection("Data … | |
I am populating datagridview with 9 columns through dataset. After this I add 4 comboboxes programatically. Now for the first time form loads, everything goes well. But if I change selected value in combobox from FORM,grid does not gets value and it shows error **"Column cannot be added because it … | |
I have this code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connection As New SqlClient.SqlConnection Dim command As New SqlClient.SqlCommand Dim adaptor As New SqlClient.SqlDataAdapter Dim dataset As New DataSet connection.ConnectionString = ("Data Source=.\SQLEXPRESS;AttachDbFilename=c:\users\korisnik\documents\visual studio 2010\Projects\WindowsApplication46\WindowsApplication46\Database2.mdf;Integrated Security=True;User Instance=True") command.CommandText = "SELECT * FROM [User] … | |
Hello again:) I have a problem. What iam trying to do : page where user can login/create account if dont have , if logined in success page is appearing where he can add his blood glucose from tooday and also he can check his blood glucose from previous days in … | |
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.Data.SqlClient; namespace WindowsFormsApplication1 { public partial class Order : Form { public int count = 0; public string Conn = WindowsFormsApplication1.conn.getConnection(); public string getid; public SqlDataAdapter dAdapter, dAdapter1; public DataSet dSet, dSet1; public … | |
hi i need the code to calculate the euclidean distance by reading a yeast dataset file when the calcute button is clicked it show the distance between different points in another frame | |
 I'm trying to figure out how to add a new connection to MySQL running on a different computer on my network. When I click Project --> New Data Source a list of drivers appears, but none of them are MySQL (see thumbnail) which I have previously installed. I'm … | |
Hi. I needed to change two fields in my database and now my application doesn't start. What do I need to do to the dataset? The error is: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. I changed the type of one … | |
Hi, Could anyone solve this for me. I'm using VB 2010 and Access Database file. The database consists of a table called 'usertbl' with 'username', 'type' and 'level' fields. The records are as follows: Record 1 - Username: admin Type: admin Level:1 Record 2 - Username: user1 Type: user Level:2 … | |
I am populating datagridview(10 columns) with dataset.I am changing 7th column from textbox to comboboxcell at run time if some value(say caste) in database table for row is null. If caste field is not null in database, then comboboxcell should display that value for that particular row.Below is the code … | |
hi I have an access database, which I connect it to the form I have text boxes which displays info from the fields in the database. I have created a "Next", and "Previous" button, which the user can move between the database info but i don't know the code for … | |
I have 2 datagridview (dgvFrom and dgvTo) and 2 buttons with right and left arrows. dgvfrom is populated from dataset. Now when I select rows in dgvFrom and click right arrow button, selected rows should move to dgvTo grid and those selected rows should get deleted from dgvFrom grid.and vice … | |
I have a problem regarding in comparing 2 datagrid. What my plan is match the 2 datagrid and update the EmployeeID. I have 2 database. here is my existing code. selectquery as string = "SELECT EmployeeInitial, Firstname, Lastname from EmployeeRegistration" da = New OleDbDataAdapter(selecquery,con) ds = New DataSet da.Fill(ds, "Employee … | |
I have datagridview which contains total 14 columns out of which first 9 columns are filled from one table("datafile") and other 5 columns i have added programatically as shown below. Dim col_Prof As New DataGridViewTextBoxColumn() With col_Prof .Name = "xx" .HeaderText = "xx" .ReadOnly = False End With dgvUserDetails.Columns.Add(col_Prof) Now … | |
I need some help here. I keep getting the same error over and over again. And I can't understand why I am getting this error while in fact I am using the correct username and password with write capitalization. I am encountering this problem in attaching dataset in my datagridview … | |
Hi all, I have another question. I am trying to use an update statement to update an item in a listbox. Please see below: Imports System.Data.SqlServerCe Public Class Edit_Sensor_Form ' Shared variables Dim con As SqlCeConnection = New SqlCeConnection("Data Source=C:\Users\Bryan\documents\visual studio 2010\Projects\SiteSecure v1.1\SiteSecure v1.1\Database1.sdf") Dim myDA As New SqlCeDataAdapter Dim … | |
Hi, I am brand new to using SQL with VB. I am trying to be able to insert data from any given row in my SQL table. The row to be inserted is selected by the user on a listbox on Form1. Here is my code: Imports System.Data.SqlServerCe Public Class … | |
This is probably one of those that is so simple I can't see it. I have a string variable called Market. The variable is user chosen and is the exact same name as one of many tables in my dataset. Basically I am having the user choose which table they … | |
I am completely new to the C# development world and I am working on a small application which will allow a user to add basic employee details to a employee table. I can get the code to add a row to the table but the question I asked myself is … | |
Hi everyone! I have trouble putting together a chart with the contents of a data table that is basically as sex, marital status, age, and DATE . Im working with a bar chart or column chart, but I can't make it work like I want. What im looking for is … | |
Hello fellows! I have question. Iam doing some project to my school and I have small problem. I have chart (iam using jfreechart) in Chart.java file and after user is loading to his profe he should be able to push button and chart wit his statistics should appear. My problem … | |
Hi, I'm new in VB.NET and I'm having trouble with creating a **public sqlconnection** in a VB Module. I have declared **conn** as public sqlconnection but when I use it to the other forms its value is equal to "**nothing**". I hope you can enlighten me here. thanks in advance. … | |
I have a datagrid and when populated I would like to loop through the rows and add the rows to a email below is how I setup the datagrids 'Sets up the DGVInvItems DGV Public Sub setupRMAItems() DGVRMAItems.DataSource = GetRMAItems() DGVRMAItems.Columns("DetailID").Visible = False DGVRMAItems.Columns("PCode").Width = 150 DGVRMAItems.Columns("PDescription").HeaderText = "Descripton" DGVRMAItems.Columns("PDescription").Width … | |
I'm having a problem updating records from my VB.Net application to the database (Access Database). I've tried all sorts of update technique and i keep getting either "syntax error in update statement" or "data mismatch in criteria expression". heres the code i'm using: Public Function save1stsemester() 'this code updates 1st … | |
Hi, I am trying to insert values into my local SQL database. Here is my code: Imports System.Data.SqlServerCe Public Class AddSensor ' Shared variables Dim con As SqlCeConnection = New SqlCeConnection("Data Source=C:\Users\Bryan\documents\visual studio 2010\Projects\SiteSecure v1.1\SiteSecure v1.1\Database1.sdf") Dim cmd As SqlCeCommand Dim myDA As SqlCeDataAdapter Dim myDataSet As DataSet Dim oForm1 … | |
Hi, I have a Vb.Net solution that contains several forms that read/write to an MS Access database. My problem: When I copy my Vb.Net solution and Access database to a new computer, the data source connection string needs to be changed. Currently the data sources wizard sets the connection string. … | |
I need some help to make a order form in C#. My development environment is: Microsoft Visual Studio 2010 Ultimate SQL Server Express Edition 2005 Programming Language C# Sample Database = NorthWind (Tables Orders and OrderDetails) I've create a form for order entry, which contain a textbox for OrderID, a … | |
Hi All, I would like to thank this community for the enormous help to develop my skills. Thanks. I have 2 databases and a single report form and a crystal reportviewer. The User can select the database which he want to work (Each of them belongs to different warehouse) So … | |
I did the coding to create a pie chart file in png format file, the pie chart shows the percentage but in the bottom of the file, I want the percentage to appear in the chart itself, This is the codes I have used, String query = "SELECT name,flag from … | |
**********************************please see the image first link given below********************************* I have made a crystal report to assign a database to it i created a module with following code and added this module to my form Imports System.Data.SqlClient Imports System.Data.Sql Module Module1 Public acscmd As New SqlCommand Public acsconn As New SqlConnection … | |
hi, can anyone please check why im getting dataype mismatch error... im using combobox and msaccess db which consist of formNo(autonumber) LastName FirstName MiddleName Address (text) ... if i use address as valuemember there is no error,, but if i use FormNo as valuemember then there this datatype mismatch error.. … | |
Hi, I want to know what code should be used in order for me to import data from an excel file to dataset and then adding it to the database, how can it be done? thanks | |
Hi, Im new in VB.Net. im having trouble with filling the datagridview with data. the program seems to skip the part where i declare the **datagridview datasouce** and only executes until **da.fill(dt)**. here is my code, hope you could help me. thanks in advance. Imports System.Data.SqlClient Public Class Form1 Dim … | |
Hello, I'm a complete noob when it comes to .Net. I'm working on my college project. In my application there's a combobox/drop-down list. My requirement is as soon as user starts typing inside it, i.e. when text_changed is triggered it should retrieve values starting from that letter from a column … | |
Being somewhat new to VB.NET, I built a data solution by using wizards and drag-and-drop on forms. My data is in an Access DB and I opened up those tables with Server Explorer and dragged them into my dataset. I connected the tables to datagridviews. Worked like a charm. Then … | |
Hi, i have been trying to combine data from 2 different sources, to make unique rows: here it is my situation Data in DGV already in dgv, Unbound: column1 | Qty "Sugar", 100 "Salt", 100 "Color", 200 "Malto", 150 Data in datatable: column1 | Qty "Sugar", 80 "Salt", 60 "Apio", … | |
Hi, I am trying to clear the rows of a bounded datagridview without clearing its dataset. I cannot clear my dataset since i m using ds.update() to update changes from my datagrid to the sql database. On every new selection from the combo box( cb_video) the details are inserted in … | |
Hello guys im in need of a help. I have a checkbox on a Listview1 and i also have listview2, textbox and 2 buttons. On listview1, i have a list of items and its subitems. Then im going to put a check on the one of the listview item then … | |
Hi guys, I'm defining my dropdownlist in my codebehind and it continues to crash when when I bind the dataset to the actual dropdownlist. here is the aspx file: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="_332_Final_Proj.WebForm1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <%-- <link href="~/Content/StyleSheet1.css" rel="stylesheet" type="text/css" />--%> </head> … | |
Hi All, I am working for a database solution using vs 2005, and it is in final stage for reporting. I have 3 access databases. One is for selecting godown. And the remaining is godownwise databases. The godownwise databases having same structure (Tables and relationship but the data may be … | |
I am using this soap call function to get values from wsdl .I got response ,but not any data from the server. here is my code please help. $client = new SoapClient("http://www.alphamax3.com/AM3WebApp/services/PropertySearchServiceSoap?wsdl", array('trace' => 1)); $result = $client->searchInstrument( array('instrumentSearchRequest' =>array('searchInstrument'=>array('number'=>1)) )); //$property = $client->searchMap(); //$property = $client->searchInstrument(); //echo "REQUEST:\n" . … | |
I think this simple example might ask the question a lot more clearly. I have an input file with multiple products. There are different types of product (2 types with 2 product IDs is fine enough for this example), but the input will have many more. I only want to … | |
I have a requirement where value of one field in an object will be determined dynamically using a configurable table. For example, suppose I have the following table - Pk | Reference_column ---------------------- 1 | TAB_REF.AMOUNT where TAB_REF is a reference table and AMOUNT is one of the column of … | |
I am having trouble getting the codebehind to execute properly. I am new to c#.net, what I have is a web-based log in form that when the user enters their username and Id it will check against ms access to verify the username and password. I am getting this error … |
The End.