Program Temporarily Writing To DB?

Jun 24, 2009

I wrote the code and it runs through it perfectly, the problem is that it will only save it to the database temporarily. So once I close down visual studio for the night and come back to it what's been entered is gone. It's not a published program still in debug mode but I've not run into this before. I have another program I'm working on that I'm running purely in debug mode and it works flawlessly. The code between the two is the same cause I just copied it and changed the parameters. Any ideas? I'm using an sql mdf btw.I should clarify, don't know if it matters or not, that the DB that is working is in SQL server whereas the DB I'm having trouble with is a mdf that I added into the program.

View 3 Replies


ADVERTISEMENT

Writing A Program For Salesperson

Mar 23, 2011

Ok this is what I have so far. Now the numbers are not adding up at all. When I type in the name and it ask for the code then the monthly sales and commission are at 0 and they should be. [code]

View 4 Replies

Writing To Sql And Program Crashes

Jan 7, 2011

This is a program I am making for a game he is making. All it needs to do is add information from textboxes into sql fields when clicking create account. That is working perfectly however if I tell it to add an account a second time it crashes. saying ?

[Code]...

View 2 Replies

Program Works Writing Error?

Mar 29, 2010

Just completed a program, and tested it. It works, and does exactly what its supposed to do, but I continue to get this error: Cannot Write to a closed TextWriter.The code I'm using is below, but the issue here which I'm guessing would be that in my If statement.[code]'Goes on to create a bunch of tabled XML text.I have this code copied throughout each If Then loop. Basically If the text box is blank then the program will close the table and stop writing.I know the problem most probably lies in that its reading that its trying to close the table or stop writing, but the program forces it to continue.

View 9 Replies

Forms :: Writing A Marketing Email Program?

Feb 8, 2011

I am writing a Marketing email program so we can email news letters and the lke to customer listed in our database.One part of the application is a email templates page. On this there is a tabpage. Tab1 has a textbox and teb2 has a browser window.The user pastes/write HTML code in to the text box and it displays the formatted email/html in the browsers window.

The users just want to edit the text from time to time and within VS.NET and TEXPAD the html code is colour coded depending on the html tags.I guess this can not be done in my textbox1 but can it be done in a rictextbox and text_change event?

View 2 Replies

Writing A Blackjack Game Program In .net 2008?

Dec 7, 2009

I am writing a blackjack game program in vb.net 2008. The program is designed to play 6 players per game in sequence using a pre existing algorithim (basic strategy). The program will play one game at a time using all 6 players or can be set to play 100 games using all six players and then capture the resulting data generated from each player from every card. When one game at a time is played the program works fine. When the program plays 100 games at a time it drops (loses) the data that is being stored in its string variable arrays.

View 1 Replies

Writing A Program That Will Encrypt Text Using AES Encryption

Feb 14, 2009

I need some help with writing a program that will encrypt text using AES encryption. I'm not quite sure how to go about doing this.

View 1 Replies

Writing A Program Which Takes One Item From Each Of Two Lists?

Jun 11, 2011

I'm writing a program which takes one item from each of two lists and combines the items in one of three ways selected by the user. The results of the process are provided in either a summary form or a detailed form, again selected by the user. As it's currently developing, this program will contain six subroutines covering each of the six combinations of user selections, which are stored in three Booleans. Selection of the appropriate subroutine is done through traditional "if then else" coding.If I understand OO and Visual Basic (Express 2008) correctly, I could make the subroutines into different variations of one method, which when invoked would automagically use the correct coding depending upon the settings of the Booleans / properties. Assuming this is correct, the problem is that I have no idea how to actually set up code like this.

View 4 Replies

Writing Program To Read The Text File

Apr 19, 2012

CODE:

So when i click btnNextRecord i need it to show data for first employee when i click btnNextRecord move to the second one and so on. But when i click btnNextRecord it only displays data for last Employee and if i keep clicking it, it will keep displaying the same data for the same amount of employees i had entered data for.

Attached File(s)

View 6 Replies

Hide Buttons Temporarily

Jun 22, 2010

I'm trying to hide 5 to 12 buttons on a form until a screenshot is saved to the clipboard. I have it set right now so the user clicks a button(btnSavePDF) and then whichever buttons are visible are made not visible. But I haven't a clue how to restore just those buttons. I'm trying to avoid restoring them all unless they were all originally visible.

[Code]...

View 4 Replies

Creating And Writing To Text File Upon Program Load

Oct 27, 2010

I want to create and write to a text file upon Program Load...this is my code (does not work):
Dim path As String = "C:Documents and SettingsAll UsersDocumentsThe Bible Study Tool est.txt"
My.Computer.FileSystem.CreateDirectory(path)
'create and write to settings file
My.Computer.FileSystem.WriteAllText(path, "Some meaningless Text!!!!")
The directory is there, but the text file is not....

View 8 Replies

DB/Reporting :: Writing A Program And Loading Info Into A SQL Database

Feb 17, 2009

I'm writing a program in VB.Net and loading the info into a SQL database. Debugging it works fine on my machine that I am programming it on, it connects to the database and runs through all the info perfectly. However trying to get it to run on another machine it will not connect to the database. I realize the reason for this is the connection string, it's looking specifically at the file directory for the database. How do I change this so that it will function on any machine. The program is only intended to run on one machine at a time and not over the internet.

View 2 Replies

Diary Program - Reading, Writing Text Files?

Jan 23, 2012

i have started programming a diary sort of program. i have a home form which takes you to other features. im not sure if there is an easier way to do this but the view is week by week with a new week on a new form. and on each form i have a separate text box for each day. using the code:

'In the form load event:
txtMonday.Text = My.Computer.FileSystem.ReadAllText("DayMonth.txt")
'In the text-changed & form closing event:
My.Computer.FileSystem.WriteAllText("DayMonth.txt",
Monday.Text, False)

View 5 Replies

Forms :: Writing A Program That Retrieves Certain Lines From A Textfile?

Jul 9, 2010

I'm writing a program that retrieves certain lines from a textfile. This textfile is rather large, so is it possible to have a progressbar that shows the progress when it retrieves?

View 1 Replies

Program Has Long Freeze While Writing Text File

Feb 26, 2012

I am making a program that loads, edits and saves 5000 rows x 100 columns of data. The data is stored in a datagridview. I use these commands to write the file:

dim z as integer
dim z1 as integer
fileopen(1,"c:drawermyfile.txt",openmode.output)
for z=0 to datagridview1.rows.count-1
[Code] .....

Every time I issue this command the whole program freezes until the computer is done writing the file. Is there some way I can get it to write this file without freezing up the program? Or, perhaps a better way to write this large data file?

View 16 Replies

Starting Calculations - Writing A Program That Has 6 Text Boxes

Nov 17, 2009

How do I start writing a program that has 6 text boxes. A person would enter a member number if they have one, number of movies rented at $1.80 a piece. A Text box should then display Total Rental Price, and if a member number was entered, a 10% discount is given (the total of the discount shows up in another text box) and after there discount is applied the Amount Due is displayed in yet another Text Box.

My boxes are named:

memberNumberBox
moviesRentedBox
rentalPriceBox = $1.80
totalPriceBox
discountBox
amountDueBox

This is all supposed to happed when the customer clicks on a calculation button named: Button1

This is what I have so far, but I don't even know if this is correct, as I am getting 1 error relating to a name not being declared. Please help and clue me in to where to start!

Public Class Bonanza
Private Sub memberNumberBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles memberNumberBox.TextChanged

[CODE]...

View 3 Replies

Stop Program From Writing To A File When Certain Conditions Aren't Met?

Dec 11, 2011

I am building an application that accepts input entered into textboxes, then checks the input for negative values, etc. before writing it to a file. If the data does not meet the conditions, a message box pops up letting the user know. The problem I am having is that after it checks the data and displays the message box, it continues to save the input to the file anyway. How do I make it only write to the file if all the data meets my conditions?

View 1 Replies

VS 2008 - Writing A Program That Shows The Sales Tax Of Items?

Oct 4, 2009

I am a first time poster and fairly new to using VB 2008.I was having some trouble with writing a program that shows the sales tax of items (i.e cars, food, etc).

[code]...

The buttons are in the middle and the four text boxes are marked with brackets and underscores.I know how to code the "clear" and "exit" button but I am having some difficulties with the calculate button.

View 9 Replies

Writing A Program To Interface With A PlusDeck 2c Cassette Player?

Mar 14, 2010

I am writing a program to interface with a PlusDeck 2c Cassette Player.The device communicates through the serial port.

View 8 Replies

Any Way To Temporarily Removing Record From Table?

Nov 30, 2009

Ihave created a system that allows an IT manager to log faults and assign them to available technicians, basically, you select a member of staff, a technician and describe the fault and then log it. But what I want to be able to do is take the technician out of the table until the fault is cleared and the technician is free. I have started this process but my head is spinning and I am not 100% where to turn next. I currently have a Busy field in the technician table and I have the code that allows the technician's busy status to change to 0 instead of 1 but I cannot for some reason get it to turn back to 1 when I clear the fault.

I think I may need some sort of If then statement like
If datagridview2.currentrow.cells(4) = 0
Then datagridview2.currentrow.remove

I've been using a FileSystemWatcher to detect changes and this is the code that changes the technicians busy status to 0:
Dim BusyM1 As String
BusyM1 = DataGridView2.CurrentRow.Cells(4).Value
sql = "update Technicians set busy=1 where busy='" & BusyM1 & "'"
Dim commandUpdate As New OdbcCommand(sql)
[Code] .....

And here is a code I tried to use to return the status back to 1 for the technician busy status
Dim NotBusy As String
NotBusy = DataGridView2.CurrentRow.Cells(4).Value
sql = "update Technicians set busy=0 where busy='" & NotBusy & "'"
Dim commandUpdate As New OdbcCommand(sql)
[Code] .....

View 2 Replies

How To Temporarily Hide A Modal Form

Mar 29, 2009

I've created an Excel COM add-in that has several forms. The application has the following forms:

FormA (Modeless): Excel.Application is parent
FormB (Modal): FormA is parent
FormC (Modal): FormB is parent

[code].....

View 3 Replies

How To Turn Off Right Click Menu Temporarily

Mar 5, 2009

I have a graphics application I'm working on that displays full screen so there's no control in the upper right to close the application. I have it set up so that a right click closes the application but I noticed that a right click menu comes up on the desk top after my application closes which is no big deal. You could ignore it but I was wondering if there's a way to turn off the right click menu so that it wouldn't come up though I would want it to be enabled after that first click that closes my program.

So the right click would close the program disable the right click menu and then enable it again so that the next right click would show the menu. Haven't come up with anything on searches. I could use something else to close my application but if there's a convenient way of doing this I would like to find out what it is. I have almost every key on the keyboard doing something though I haven't used F1 through F12 at the top of the keyboard. Maybe I'll use F1 if I don't find out how to do this. How to use F1 to F12 to close or do something?

I've been using keypress events to do a lot in my application but for
Select Case e.KeyChar
Case "F1"c
isn't valid.
I tried other things. {F1} etc. I have option strict on. Thus the little c is necessary for characters like "a"c or "b"c.

View 2 Replies

Temporarily Disable Events For A Given Control?

Nov 13, 2007

I'd like to temporarily disable events for a given control. For example, the SelectionChanged event on a combobox might be used to update a display every time the user changes the combobox... but while I'm filling the combobox with values, I don't want the SelectionChanged event to be firing over and over... I need to disable events while the combobox is being populated. How do I do this?

View 12 Replies

Temporarily Elevate The Privilege Of VB Code?

Mar 8, 2009

My VB program creates a file on a NAS drive via the SaveFileDialog component in a different user context than the person launching it.It works because the person who runs my ClickOnce deployed program uses RunAs from the program's exe (thereby bypassing the ClickOnce pre processor). The problem is that the program extensively supports drag and drop which doesn't work between the User and RunAs contexts.

The program is a VB 2008 Express Windows Forms Application running on XP workstations with peer-to-peer (workgroup) access control. i need to execute only the SaveFileDialog component with impersonation via the user account we've been using with RunAs. Something along the lines of what RunWithElevatedPrivileges accomplishes in SharePoint Services. This is not happening in a hostile security environment - so, the solution needn't be impregnable.

View 6 Replies

Temporarily Saving Data To Localhost?

May 24, 2012

how to temporarily save the user input to the pc he is using then save to another pc in the network later. Our LAN sometimes disconnect or there maybe power interruptions and I don't want that the input of the user disappear due to disconnection or power interruption. What is the easiest way to accomplish this?

Here's what I'm working so far. The data saves to another pc.

Imports System.Data.SqlClient
Public Class formGrammarI_Page01to04
Dim db As New EPTR_DataDataContext

[Code]....

View 7 Replies

Using RAM Disk To Save Data Temporarily

Jun 30, 2009

I need to use a virtual drive (ram disk) to save data temporarily. Which ram disk program is good to use.

View 6 Replies

VS 2008 Temporarily Change The Value In A For Loop?

Feb 2, 2010

I'm trying to temporarily change the value of i in a for loop because I've got a problem when entering data into excel.Every second line is has the .marketName "To Be Placed" so they appear blank like this.

DATA 1
DATA 2
DATA 3

I want to change the value of i so there isn't a blank line between each entry.

vb.net
Private Sub BHorse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BHorse.Click
Dim oMarketsReq As New BFExchange.GetAllMarketsReq
Dim oMarketsResp As BFExchange.GetAllMarketsResp

[code]....

It seems to get into an infinite loop as the way it is, even after I change the value of i back.

View 12 Replies

Writing A Program To Download A File From An Official Website Every Sunday?

Jul 9, 2011

Im writing a program to download a file from a official website every Sunday. The adress of this site keeps changing. Does anyone know how I can link to this address?

[URL]

I've highlighted the part of the adress that changes. As you can see, it's a date, but not nessesarily the current date. It could be yesterday, or the day before. I've tried something like this:

Dim link
link = "http:www.fiskeridir.no/content/download/4641/30774/version/254/file/Register-internett-*.xlsx"

This doesn't work.

View 4 Replies

Writing A Program To Login And Read Information Off Of Specific Web Pages

Sep 5, 2008

I am writing a program to login and read information off of specific web pages.I have gotten serveral working already, but I'm having a problem with this one.

<input name="DL_AUTH_USERNAME" type="text" size=10 style="font-size:9px;font-family:arial">Password:<input name="DL_AUTH_PASSWORD" type="password" style="font-size:9px;font-family:arial"><input type="hidden" name="next" value="/"></span><input type="submit" value="Go" class="button">

For some reason I can get it to load username and password but I cannot figure how to get it to click the go button.

View 4 Replies

Writing A Program Which Has To Perform Several Operations On Data Exported From A CAD Software?

Nov 11, 2010

I'm writing a program which has to perform several operations on data exported from a CAD software.The amount of data to be processed is huge and even by simplifying the program at maximum it will still take about 10-15 minutes for average models.

The operations are performed on an array from the first to the last element. Let's say for a list of 10 elements (as example) that I start from element 1 and I finish when element 10 has been computed. I thus thought that since I'm working on a 8 processor machine would be convenient to make use of multi-threading. My idea is, for the case of 10 elements, to make thread1 working from 1 to 5 and make thread2 working from 6 to 10.I already wrote a working code for a 2 thread process which is working, but I want to extend the number of threads and eventually decide in function of the threads available. The basic structure is given below:

[Code]...

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved