Member Avatar

Hi guys, I'm using a very simple database and dataset and it appears to be working, except I can't actually save any data. Here's what I did: I created an empty database with a corresponding empty dataset. I filled it in with 4 rows of dummy data (ID, name, address, etc). I dragged the table (called Lawyer) to the dataset. This created the update and insert methods. I then created a class, which has two methods. One to count the records, and one to add new data. This should be simple, and I've done it before, but for some reason …

Member Avatar
+0 forum 6
Member Avatar

I want to save data in to my ACCESS database from textboxes. My code is here. Private Sub BtnSubmit_Click(sender As Object, e As EventArgs) Handles BtnSubmit.Click Dim cb As New OleDb.OleDbCommandBuilder(DA) Dim dsNewRow As DataRow DA = New OleDb.OleDbDataAdapter(SQL, CN) DA.Fill(DS, "Deposit") dsNewRow = DS.Tables("Deposit").NewRow() dsNewRow.Item("Bank") = TxtBank.Text dsNewRow.Item("Acno") = TxtAcno.Text dsNewRow.Item("Name") = TxtName.Text DS.Tables("Deposit").Rows.Add(dsNewRow) DA.Update(DS, "Deposit") MsgBox("New Record added to the Database") clearall() End Sub On running the programme It is interrupted and getting the following message "Update requires a valid Insert Command when passed DataRow Collection with new rows". Please correct my code Or guide me how can …

Member Avatar
+0 forum 5
Member Avatar

Hello good afternoon. I have successfully serialized data in the past, however it seems as if I don;t fully understand the process. I have a class called ProgramState which stores a variable (called lastCreated) with custom class LinesProject and an ArrayList variable(called recentProjects) of this custom class. The purpose of these variables is to store the last created project as well as a list of five recently opened projects. Here is ProgramState: public class ProgramState implements Serializable{ private LinesProject lastCreated; private ArrayList<LinesProject> recentProjects; public ProgramState() { lastCreated=new LinesProject(); recentProjects=new ArrayList<LinesProject>(); } public ProgramState(LinesProject proj) { lastCreated=proj; recentProjects=new ArrayList<LinesProject>(); } //Setters …

Member Avatar
+0 forum 3
Member Avatar

Good day folks. Problem: My program needs to import data from a database and display them in a table then manipulate and display the data in various ways. That bit is solved the next part is where I need help. The program then needs to save locally... 1. the newly processed data (what I mean is the data from the database plus all related data created by way of data manipulation). 2. the last view of the program? (What I mean is, when the program is restarted I want it to display the last thing the person saw; GUI and …

Member Avatar
+0 forum 22
Member Avatar

Hello good day. I have a quick question is anyone able to assist me in saving a password file. I encrypted my password and so I want to save the salt and the encrypted password(which are byte arrays). I tried using a properties file, but I soon found out that I can't. Can anyone assist me in saving these byte arrays and retrieving them please?

Member Avatar
+0 forum 5
Member Avatar

hey guys... just wanna ask, is setting timezone on php automatically computes for daylight saving times? i mean does it autmatically detect DST and automaticaly add +1 hour on specific month? thanks in advance

Member Avatar
+0 forum 4
Member Avatar

Ok, this is a little hard to explain, i basically am making a miniature operating system and there is a notepad feature. I am allowing a save in this operating system. I have a hidden button on the mainscreen than shows itself when the save is clicked on the notepad form. The problem is that I cannot figure out how to actually make it save. I need this button to be clicked, the notepad form to open (not a problem,) and the multiline textbox to have the same text as before. Any help would be appreciated. Thanks a lot

Member Avatar
+0 forum 2
Member Avatar

Forgive me if this thread was repost. :( I am a novice in database system for game development. Can Mr./Mrs. (Master) in here give me an example of a saving system for game? or it just use a database?(Like SQL?):idea: Like a feature for "Save the Games" and sometimes the player can "Continue" or "Load games". I imagine the database will store data for the game like level, exp., skill, coordinates, items, etc. ;) Thankyou for the reply :) I'm really appreciate it :) (I'm sorry if my english not good :()

Member Avatar
+0 forum 7
Member Avatar

I need to save pictures in my database, my database is MSSQL as of now, my code for getting the picture is this: Private Sub browsepic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles browsepic.Click With dialogpic 'Open File Dialog sa toolbox .InitialDirectory = "C:\Users\CAMILLE\Pictures" .Filter = "JPG Files|*.jpg|PNG Files|*.png|GIF Files|*.gif" .FilterIndex = 2 End With If dialogpic.ShowDialog() = DialogResult.OK Then With studentpic .Image = Image.FromFile(dialogpic.FileName) .SizeMode = PictureBoxSizeMode.StretchImage .BorderStyle = BorderStyle.Fixed3D End With End If End Sub Can you help me on how to save the picture and how to retrieve it?

Member Avatar
+0 forum 12
Member Avatar

I cannot read the info I stored into the files and I need help. Whenever I give the user the option of saving more records or simply retrieving a record, it always stops on the retrieving part. [CODE] Type Str25 = String[25]; TBookRec = Record Title, Author, ISBN : Str25; Price : Real; End; Procedure EnterNewBook(var newBook : TBookRec); Begin Writeln('Please enter the book details: '); Write('Book Name: '); Readln(newBook.Title); Write('Author: '); Readln(newBook.Author); Write('ISBN: '); Readln(newBook.ISBN); Write('Price: '); Readln(newBook.Price); End; Var bookRecArray : Array[1..10] of TBookRec; tempBookRec : TBookRec; bookRecFile : File of TBookRec; i : 1..10; choice: integer; Begin …

Member Avatar
+0 forum 2
Member Avatar

Hello there, im writing code for my asteroids game and am nearly finished but ive come across a problem when trying to load the file the save game is written like this and works perfectly fine, it saves the things i want to a text file: [CODE]void WrapGame::save() { cout<<"enter the filename (Max 20 characters)"<<endl; cin>>Filename; ofstream saveGame(Filename, ios::out); saveGame<<gameState<<"\n"<<score<<"\n"<<health<<"\n"<<lives; saveGame.close(); }[/CODE] The load game function however throws me a red line under the first >> after savegame on the last line of the function is called [CODE]void WrapGame::load() { cout<<"Enter the name of the file you wish to load:"<<endl; …

Member Avatar
+0 forum 4
Member Avatar

Hi, I've been trying to capture video from webcam using openCV functions and openGL for rendering. The code is working fine and I can acquire and display both the cameras. Now I'm trying to record the captured video's and saving them to a file using openCV createvideowriter object. I can easily save the video into .avi format. However when I try to save/write both the videos from both camera's then the video is saved from first cam properly but not from second. I then started looking for using threads. I haven't used threads before and even after going thru articles …

Member Avatar
+0 forum 2
Member Avatar

Hi, This is basically a continuation of my last thread but under a diffrent topic. I want to be able to save basic information entered in my application as a .'help' file for example, when i open that file te information will be viewed in my application. Any ideas?

Member Avatar
+0 forum 1
Member Avatar

Hi, I am writing a program to store basic information such as name and address but i want to be able to store this information as a separate file. So for example i could fill out the Name as 'Mary' and then save this as an executable file which I could open and i would repeat the information i entered into it namely "Mary". I am still fairly inexperienced in C# so code would be useful.

Member Avatar
+0 forum 9

The End.