4,457 Topics

Member Avatar for
Member Avatar for PM312

I am getting below Error “Update requires a valid InsertCommand when passed DataRow collection with new rows.” **Below is the code in Module** Module ModDBConnection Public CnCommon As New SqlConnection Public DTCodeMaster As New DataTable Public DACodeMaster As New SqlDataAdapter Public CBCodeMaster As New SqlCommandBuilder Public Sub CommonCn() CnCommon = …

Member Avatar for PM312
0
192
Member Avatar for Woodenhousen

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 …

Member Avatar for sohaiby
0
1K
Member Avatar for celina1234

I have a text file which looks like this : Flooding refers to all water that overflows a node, whether it ponds or not. -------------------------------------------------------------------------- Total Maximum Maximum Time of Max Flood Ponded Hours Rate Occurrence Volume Depth Node Flooded CMS days hr:min 10^6 ltr Meters -------------------------------------------------------------------------- 1064 0.15 0.000 …

Member Avatar for deceptikon
0
123
Member Avatar for Lethugs

How can I specify the Server of my database when I make my project executable I have this module I call everytime i modify my database Public Sub main() constr = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:"database file".mdf;" & _ "Integrated Security=True;Connect Timeout=30;User Instance=True" Con = New SqlConnection(constr) Try Con.Open() 'MsgBox("Server Connection is Open …

Member Avatar for john.knapp
0
831
Member Avatar for mike.mcwhinney.3

Hello, I have been struggling a little bit with an issue in a relational database that supports queries. Originally I was going to use an OleDB data adapter and connect to an Microsoft Access database (created with Access 2000). The problem is that when I use a connection string like: …

Member Avatar for deceptikon
0
148
Member Avatar for romz

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. …

Member Avatar for romz
0
717
Member Avatar for eyeda

i'm trying to make an autocomplete that will display the name of files in a folder. The autocomplete is ok except the part that it only display for the last file name. your help and suggestions much appreciated! =) code to open the folder and list the excel file names. …

Member Avatar for eyeda
0
890
Member Avatar for christinetom

Hey... If I just built a library for any open source software for C++, what file type should the library files come in? .a OR .o files? Thank you.

Member Avatar for christinetom
0
196
Member Avatar for daino

Has anyone ever used PLPLOT. I'm trying to compile one of the examples (which build successfully during the plplot build process) but I want to build the example individually. It's proving very challenging. A million linker errors and no clue on their website as to what is going wrong. I've …

0
161
Member Avatar for Obike

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 …

Member Avatar for Obike
0
558
Member Avatar for Thomas7399

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 …

Member Avatar for poojavb
0
288
Member Avatar for crazydevelopervish

i have one datalist having shopping cart table which retrieves values as per customer_id aspx code. <asp:DataList ID="DataList1" runat="server" DataKeyField="Customer_Product" DataSourceID="SqlDataSource2" onupdatecommand="DataList1_UpdateCommand" oneditcommand="DataList1_EditCommand1" ondeletecommand="DataList1_DeleteCommand" oncancelcommand="DataList1_CancelCommand1"> <HeaderTemplate> <table border="solid 1px black"> <tr> <th style="width: 250px"> </th> <th style="width: 400px"> Item Description </th> <th style="width: 100px"> Price </th> <th style="width: 100px"> Qty …

Member Avatar for kvprajapati
0
185
Member Avatar for HunainHafeez

i put a code in my website to redirect user to paypal sandbox , after entering his email id , and storing it in session , in return url of paypal sandbox i mentioned a page but it doesn't work, it doesn't maintaing the session variable, it assigns null to …

Member Avatar for HunainHafeez
0
1K
Member Avatar for crazydevelopervish

my aspx code <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" > <ItemTemplate> Product_Image: <asp:Label ID="Product_ImageLabel" runat="server" Text='<%# Eval("Product_Image") %>' /> <br /> Item_Description: <asp:Label ID="Item_DescriptionLabel" runat="server" Text='<%# Eval("Item_Description") %>' /> <br /> Price: <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("Price") %>' /> <br /> Qty: <asp:Label ID="QtyLabel" runat="server" Text='<%# Eval("Qty") %>' /> <br …

Member Avatar for crazydevelopervish
0
129
Member Avatar for gon1387

Hi Everyone, I've been looking for good javascript projects to join. Are there any projects you can advice? I've researched a lot. (with the help of Google. :D) But would also love to get advices from people who have/had worked at an opensource project here. I would also love to …

Member Avatar for gon1387
0
283
Member Avatar for diya45

in this when i updated data then not updated it is deleted in update button but there is update fuction how i solve this problem that data are update????/ here is updated fuction { string constring = @"Data Source=.\SQLEXPRESS;Database=htm;Integrated Security=True"; SqlConnection con = new SqlConnection(constring); con.Open(); DataTable dt = new …

Member Avatar for samsylvestertty
0
177
Member Avatar for monching

Hi there, I have been trying solve my error at this codes, it takes me too long. Code: Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim conn As New MySqlConnection Dim myCommand As New MySqlCommand Dim comm As String Dim myconnstring As String Dim UserID …

Member Avatar for monching
0
471
Member Avatar for ahmed_one

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 …

Member Avatar for ahmed_one
0
2K
Member Avatar for lkkkeith

I am trying to connect to db2, but there is an error "system.data.oledb.oledbexception unspecified error" and highlighted the line conn.Open() . I want to know what are the prerequisites for the connection. Or simply my code is doing wrong??? Thank you for any help. Dim Source As String Source = …

Member Avatar for pritaeas
0
64
Member Avatar for diya45

i hve reservation form add function and add button public void addreserve() { string constring = @"Data Source=.\SQLEXPRESS;Database=htm;Integrated Security=True"; SqlConnection con = new SqlConnection(constring); con.Open(); DataTable dt = new DataTable(); SqlCommand com = new SqlCommand("insertreserveinfo", con); com.CommandType = CommandType.StoredProcedure; com.Parameters.Add(new SqlParameter("@Reservation_id", myreserv.Reservation_ID1)); com.Parameters.Add(new SqlParameter("@Guest_id", myreserv.Guest_name)); com.Parameters.Add(new SqlParameter("@Room_ID", myreserv.Room_no)); com.Parameters.Add(new SqlParameter("@Service_ID", …

Member Avatar for samsylvestertty
0
110
Member Avatar for diya45

i have a form whcih is room and in this there is when i add a data on it that is room id,room no and service type and room type then when i add the data like as room id=1 room no=2 room type=double service type=luxury then when i again …

Member Avatar for samsylvestertty
0
206
Member Avatar for chdboy

Hi I'm using a simple insert statemnt in from two textfield into my database using this code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If (TextBox1.Text.Trim = "") Then MessageBox.Show("PLEASE DO NOT USE BLANK SPACES", "Data Entry Error") ElseIf (TextBox2.Text.Trim = "") Then MessageBox.Show("PLEASE DO …

Member Avatar for Reverend Jim
0
859
Member Avatar for charuwaka

**********************************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 …

Member Avatar for john.knapp
0
469
Member Avatar for kinbo

I wrote a C# code called parent. When i run the program and try to add parent details to the database( microsoft access 2010), it gives me this error: Exception in DBHandlerSystem.Data.OleDb.OleDbException (0x80040E14): Syntax error in INSERT INTO statement. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) …

Member Avatar for deceptikon
0
2K
Member Avatar for jeansantos

The idea would be to read the items of Listbox1 (one-by-one) and run a query (Listbox1 ->Field1) and display the result (Field2 -> Listbox3) in the same Listbox3. For some reason, only appears in Listbox3 the result of the last item of Listbox1. Dim con As New OleDb.OleDbConnection …

Member Avatar for jeansantos
0
134
Member Avatar for beginner_emman

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.. …

Member Avatar for Reverend Jim
0
656
Member Avatar for amnakhan786

Hi, i am relatively new to programming. i am trying to use an open source library found by google search. the readme file tells to write make on commandline, as a result i got an exe file sample, but now i am trying to chk the output and the usage …

Member Avatar for JasonHippy
0
237
Member Avatar for darkeclipse8

My professor asks me to program the Game Of Life with some required and I find unnecessary classes. But anyhow as I am coding and running the program midway I run into this problem void Life::setup_grid() { cout << "Size of Grid: " << grid.size() << endl; cout << "rows: …

Member Avatar for NathanOliver
0
409
Member Avatar for diya45

hi all store procedure set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER procedure [dbo].[insertguestinfo] @Guest_ID int, @first_name nvarchar(50), @Last_name nvarchar(50), @Gender_ID int, @Martial_ID int, @Phone_number int, @email_address nvarchar(50) as begin insert into GuestInfo(Guest_ID,First_name,Last_name,Gender_ID,Martial_ID,Phone_number,Email_address) values(@Guest_ID,@first_name,@Last_name,@Gender_id,@Martial_id,@Phone_number,@email_address) END public void add() { Guest_info gst_info=new Guest_info(); string ConString = @"Data Source=USER-PC\SQLEXPRESS;Initial Catalog=htm;Integrated Security=True"; SqlConnection …

Member Avatar for yousafc#
0
170
Member Avatar for romz

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 …

Member Avatar for romz
0
121
Member Avatar for crazydevelopervish

I have one form having One DataList In which i have two table one having Header Template and other having Item Template....... Code Of aspx page is as follows..... <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"> <HeaderTemplate> <div> <table> <tr> <td style="width:245px; text-align:center;"> Image</td> <td style="width:450px;text-align:center;"> Item Description</td> <td style="width:260px;text-align:center;"> Price</td> <td style="width:322px;text-align:center;"> …

Member Avatar for crazydevelopervish
0
134
Member Avatar for TonyG_cyprus

Have you got one? A list of things you would like to achieve before you die? mine is: 1/ Write a stunning program that 600 people buy, but 60,00 pirate. 2/ Really know and be fluent in another language (Greek in my case). 3/ Visit Tibet. 4/ Win just enough …

Member Avatar for jalpesh_007
0
160
Member Avatar for kubiak

Hi, I have problem with my connection to the database generate from entity data model of Ado.Net Entity framework. I work in Console Application. My code looks like that: public static void Main(string[] args) { string connectionString = "Data Source=(localdb)\v11.0;Initial Catalog=BarDatabase;Integrated Security=True"; using(SqlConnection con = new SqlConnection(connectionString)) { string queryStatement …

Member Avatar for grarhakim
0
253
Member Avatar for meLiel

Private Sub cmdAdd_Click() Dim con As ADODB.Connection Set con = New ADODB.Connection Dim rsAdd As ADODB.Recordset Set rsAdd = New ADODB.Recordset Dim Query As String con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Asus\Desktop\VBTHESIS_liel2\ListofMembers.mdb;Persist Security Info=False" con.CursorLocation = adUseClient rsAdd.Open "SELECT * FROM census WHERE ID ='" & strId & "'", con, adOpenStatic, adLockOptimistic 'If textboxes …

Member Avatar for hyesin
0
168
Member Avatar for Neethaa

Dim Cname As String Dim CID As Integer Dim Rmaterial As String con = New OleDbConnection("Provider=Microsoft.ace.Oledb.12.0;Data Source= C:\Users\Lenovo\Documents\Visual Studio 2010\Soft\Database\Login.accdb") con.Open() cmd = New OleDbCommand("select * from Purchase where CompanyID='" & txtnum.Text & "'", con) dr = cmd.ExecuteReader() If txtname.Text = "" And txtnum.Text = "" And txtraw.Text = "" …

Member Avatar for Reverend Jim
0
599
Member Avatar for ku.heng.7

public partial class TestingDisplay : System.Web.UI.Page { PagedDataSource pds = new PagedDataSource(); protected void Page_Load(object sender, EventArgs e) { /*SqlConnection conCart; SqlCommand cmdSelectCount; conCart = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionNWind"].ConnectionString); conCart.Open(); cmdSelectCount = new SqlCommand("Select Count(*) From ProductDetails Where CategoryCode = @category", conCart); cmdSelectCount.Parameters.AddWithValue("@category", ddlCategory.SelectedItem.Value.ToString()); var countStart = (Int32)cmdSelectCount.ExecuteScalar(); lblCount.Text = countStart.ToString();*/ /*if …

Member Avatar for Mike Askew
0
355
Member Avatar for diya45

hi all now guyz i add a info in datagrid view also displau now i hve some probelms that when i create a update fuction in guestinfo table then the guest_id is autogenerte then can i delete through guest_id or not and it is also not updated public void update() …

Member Avatar for arunkumars
0
218
Member Avatar for lymwale.pablo

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 …

Member Avatar for tinstaafl
0
687
Member Avatar for dheerajsuthar

[I]Personal:[/I] [B]Name[/B] -Dheeraj Suthar aka sherkhan [B]Hair[/B] - dark brown [B]Eyes[/B] - 2 of 'em [B]Location[/B] - India [B]Hobbies[/B] - Computers, Games(FPS and strategy) [B]Favourite Music[/B] - Kitaro Rammstein .. [B]Favourite Movies[/B] - Matrix I, Godfather, Hackers Operation Takedown, Mist [B]Favourite TV Shows[/B] - Family guy, Friends [B]Stuff I Dislike[/B] …

Member Avatar for <M/>
0
269
Member Avatar for ms061210

** Please help me debug the code, I am experiencing error in this part: cmd.CommandText = "select ROUND(((date_from - date_to)/30),0) as months from rental where tenant_id = '" & Me.TextBox9.Text & "'" cmd.CommandType = CommandType.Text It says: Error while retriving record on the table.. There is already an open Data …

Member Avatar for john.knapp
0
155
Member Avatar for tricket_7

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 …

Member Avatar for Mike Askew
0
162
Member Avatar for mail.sujitkulkarni

Hi, I am experiencing irritating error (undiscriptive rather), when I want to insert a single statement into my db. Following is the code: protected void Button1_Click(object sender, EventArgs e) { SqlConnection dataConnection = new SqlConnection(); dataConnection.ConnectionString =@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"; SqlCommand dataCommand = new SqlCommand(); dataCommand.CommandText=("INSERT INTO citylist(city_id,city_name,latitude,longitude,state) VALUES ((1, …

Member Avatar for mail.sujitkulkarni
0
3K
Member Avatar for AndyPants

Hello, I currently am running a gameing server and found some php code to send RCON commands to my game server. I am completly new to PHP, but not new to code. I would appreceate if someone could fix these 2 lines of code. On my XAMPP server I have …

Member Avatar for diafol
0
184
Member Avatar for Tobyjug2222

Hey Guys, I'm an A level student studdying Computer science, and hence using VB.NET for my coursework. Therefore I'm very novice at VB! While trying to update Data in a Microsoft Office, Access table (Office 2010) - I get this error. (In VB) Bare in mind, I've read all this …

Member Avatar for Tobyjug2222
0
610
Member Avatar for diya45

hi all i make a store procdeure in visual studio wpf when i run a code the error is not solve here is error "Procedure getguestinfo has no parameters and arguments were supplied." and here is the code public class guests { private int guest_id; public int Guest_id { get …

Member Avatar for arunkumars
0
316
Member Avatar for Neethaa

Private Sub btnInsert_Click(sender As System.Object, e As System.EventArgs) Handles btnInsert.Click Dim con As New OleDbConnection Dim cmd As New OleDbCommand Dim dr As OleDbDataReader Dim Pnum As Integer Dim InDate As Date Dim PDate As Date Dim Amount As Integer Dim CmpID As Integer Dim Tax As Integer Dim TaxAmt …

Member Avatar for Reverend Jim
0
172
Member Avatar for servis

i want to get the alert on responce text, but getting nothing, my code is as follow, [ICODE] <?php session_start(); ?> <script type="text/javascript"> var xmlHttp function checkCAP(str) { if (str=="") { alert("plase enter the code"); return } xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } …

Member Avatar for karlosdpm
0
3K
Member Avatar for sundar.mjk

hi it 's working but the Grid view not disp.lay the details Dim cn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;" & "Data Source=D:\Task_one_one\TaskNew\TaskNew\App_Data\db1.mdb") cn.Open() Try Dim myTable As DataTable = New DataTable("MyTable") 'Dim ds As DataSet = New DataSet myTable.Columns.Add(New DataColumn("Emp Id")) myTable.Columns.Add(New DataColumn("Start Time")) myTable.Columns.Add(New DataColumn("End Time")) myTable.Columns.Add(New DataColumn("Hours")) myTable.Columns.Add(New …

Member Avatar for G_Waddell
0
174
Member Avatar for 404notfound

I found a tutorial online that so far has been aswesome. I downloaded the access db and so far can read and browse through it. However, when I try to write back to it (btnSubmit_Click), nothing happens. All other buttons work fine, I can still browse, and I get absolutely …

Member Avatar for XEN0
0
181
Member Avatar for jfunchio

I'm trying to add a file uploader to my website and I was wondering if there is any way or any open source code that can upload a file and the display the contents of the file in an html textarea. This files with most likey be Python or Javascript …

Member Avatar for AleMonteiro
0
199

The End.