Loop/design - Looping Through A Database With Pdf Locations

Sep 14, 2011

I am looping through a database with pdf locations. The application is button click event driven. The problem I am having is that I display a pdf. If the user clicks on the button then the pdf information is inserted into a database and the loop should be taking me to the next pdf. However, this loop does not seem to give what I need. What ends up happening is the first pdf gets displayed twice. I think mainly because I display the first pdf onload, but when I click the button it agrees and grabs the first item from the database. And it ends up falling behind because its restarting the query and I cant quite figure out how to get the button to catch the first displayed pdf, or skip it entirely since I am using a welcome pdf. So on the welcome pdf that is supposed to be displayed initially the user clicks agree and it agrees to the welcome pdf instead of just skipping it. I am not quite sure how to just move past the pdf.

public sub onload()
display the welcome pdf
end sub

[CODE]...

Now if I run the code without the loop it works fine. I just end up having to run the app however many pdfs I have in my database.

query data
display data
insert data
Windows.Forms.Application.Exit()

To display pdfs I imported the com control for adobe so pdfs get displayed like this:

axacropdf1.src = my.mysettings.default.readpath & pdflocation

pdflocation is passed from a query fill.

I think I have an underlying design issue which probably precedes the loop.

View 4 Replies


ADVERTISEMENT

Create A Loop To Loop The Locations Of The Platform?

May 31, 2010

So I made a simple patform game where the player has to jump quickly while the platforms move to the bottom of the screen, as to not touch the bottom of the screen. But, I need to know how to create a loop to loop the locations of the platform. This means that after twenty or so platforms, the same platforms come up again, so that the player will have an "endless" game. I've declared all the platform's locations relative to the location of the first repeating platform:

[Code]...

View 1 Replies

Make An Array In A Loop Change Picture Box Locations?

May 24, 2011

I have made a For next loop with an array. I want all my picture boxes to follow each other within the loop. I have currently been using old code, but not in a loop or array format. The old code works. The array code only makes the 2nd picture box follow the FIRST one. It doesn't loop the rest. I have checked the code and cannot determine any mistakes, else I'm missing out on something I haven't been taught.[code]...

View 17 Replies

Forms :: Looping Through Controls - Design Can't Be In Separate Panels

Oct 21, 2009

I am familer with looping thru controls like so:

[Code]....

Next I have some labels on another form, that due to the design can't be in seperate panels. They are (lblChipColor1 - 6) and (lblChipValue1 - 7). I am trying to populate the color ones from the Array above. I can obviously loop thru the array, but I can't find a decent way to loop thru just the lblChipColorx lables ignoring the lblChipValue1x labels. It would be easy if they were on seperate panels. I tried adding the labels names to an array of type string and of type label, but got nowhere with that. Is there another way to group them, or build const array of label names, that I can work with?

View 3 Replies

Number Looping Using For Loop?

May 17, 2012

I am trying to loop number into something like this.

0
12
345

[code].....

View 7 Replies

Looping Through Different Textboxes With One Loop Code

Jun 1, 2010

i know there are no "control arrays" in vb.net. i do come from vb6, and im trying my way now within bv.net, so please be gentel...

if someone could please post a simple code to do the following, it would be great:

i have 3 textboxes called txtBet1, txtBet2 and txtBet3.

i have another 3 texboxes called txtResult1, txtResult2, txtResult3.

so i want to have one loop code, to get the value in txtBet1, calculate somethings, and put it into txtResult1.text.

i know it's basic, but i tried using this sample here as a reference, but its not really understandable for me, because its not really choosing the exact control i want to address...

this is from Microsoft website - a comparison between vb6 and vb.net:

"' Visual Basic 6.0
Private Sub ClearText()
For i = 0 To Text1().UBound

[Code]....

View 5 Replies

VS 2005 Loop Doesn't Keep Looping?

Feb 22, 2010

I'm making a rock paper scissors program and once I set the current_scene variable to 1, the MainLoop() sub doesn't keep looping, but the sub doesn't exit either. (Form1.vb is the most important file.)

View 9 Replies

For Loop Hanged When Large Looping Process?

Jun 8, 2011

I have a for loop like

For eacj obj as PsObject in psoObjCollection
For i =0 to 25
Rows.Add("sss")=obj.Members("sss").value

[code].....

View 8 Replies

Place Controls On An Form Using A Database For Locations?

Dec 24, 2011

I am wanting to populate a form with check boxes and labels on starting of the app. My idea is to store to locations on the form in a database. I am creating an app that would have check boxes and labels that the user could check off to store points for completed tasks. The tasks on the form could change so I want the form to change as the tasks are changes with out re-coding the app.I am using VB 2003. I have searched but couldn't find anything.

View 2 Replies

Console Application / MsgBox While Looping Without Interrupting Loop

Jul 19, 2009

Im working on a console application, and i need my application to open message boxes without stopping/interupting/pausing the loop. I have been trying to make it open another application which spawns the messageboxes, but then every message box comsumes ~4MB RAM which becomes a problem when to many gets opened.

View 12 Replies

Forms :: Pausing A Running While Loop And Wait For Certain Button Until The Looping Resumes?

May 17, 2010

I'd like to make a simple program where my form consists of a textbox and a button. Here's the ide in a nutshell:in form1_load I invoke the sub:

private Sub LoopingLesson()
dim i as integer=1
while true

[code]....

what I want is when i hits certain value, like let's just say i is divisible by 365, then the 'while' looping will stop, and a message box saying "target reached" appear. then after I click button1, the looping will resume until it reaches the next number divisible by 365, and so on.

View 10 Replies

Database Connectivity - Design The Database In Access2003 And Forms

Jun 3, 2010

I m working on an school management application, i design the database in access2003 and forms in vb.net2005. but i dont have any idea about the database conectivity. with the help of a book to connect with the db but i cannot save the data in the mdb file. in my application 1 add the followin buttons add new record modify record delete search using id or enrolment no.

View 1 Replies

Looping Through Database Too Many Times

Apr 11, 2011

I have a database and I have a form that you can add questions to the database. Once the question has been added, I go to the quiz which uses the database and it goes through all the questions twice. I was wondering why this is happening [Code] Also I was wondering how do I set up the form to be the first form shown on the program?

View 11 Replies

Looping Through Database Too Many Times?

Oct 31, 2009

I have a database and I have a form that you can add questions to the database. Once the question has been added, I go to the quiz which uses the database and it goes through all the questions twice. I was wondering why this is happening Adding Questions to the Database

Public Class frmAddQuestion
Private Sub lblAnswerToAdd1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conOpen()
sql = "Select * from questions"

[code]....

how do I set up the form to be the first form shown on the program?

View 2 Replies

SQL Database - Looping Through Some Tables

Oct 9, 2008

I am trying to connect to a SQL DB and loop through some tables. My tables are linked on the EMPLOYID field between UPR00100 and UPR00102. I want to write data as follows:
Level1, EMPLOYID, EmpName (from UPR00100) Level4, EMPLOYID, Address1, Address2,etc..
(from UPR00102)

Here is my data access code. I don't know how to code the loop. I know how to do it in SQL using a cursor but not VB 2005
Option Explicit On
Option Strict On
Imports System.Data
Imports system.Data.SqlClient
Module Module1
[Code] .....

View 2 Replies

Looping Through An Access Database Table?

Dec 21, 2011

How would I do this? I have no code at this time for it, but how could I do this?

I have an Inventory table that contains a lot of Trash Containers (Construction Dumpsters).

All of these containers have a field in the table for their "Size". If I wanted to quickly change all of the price for all Trash Containers that have a Size "40", how could I loop through the table and for each container that has a size of "40", I want to change the price lets say from $100 to $120.

View 2 Replies

"Looping" A Threadpool For Loop?

Dec 3, 2010

So I'm running a For loop that creates a ThreadPool thread and executes a task. Once the For loop finishes, I'd like it to "start over" and do the same thing. Now this obviously causes an infinite loop if I don't do it right.

what I'm kind of wondering is; is there a way to "keep" those threadpool threads active and constantly performing a task? it seems like they get disposed of once their "task" is complete.

Right now, the thread connects to a webservice, captures some data, stores it in a List(of String). This ultimately builds a ListView with the data. One of the columns is a "count" and i'd like to keep updating that count continually.

View 4 Replies

Looping Through Data Grid View And Inserting Values Into Database?

Apr 5, 2011

Currently I have a problem with updating my database with values in my Data Grid View.

On my form I have a "Populate" button and "Submit Details" button.

The "Populate" button fills my Data Grid with numerous lines of data.

On the click event for "Submit Details" I want this data to be inserted into a table in my DataBase by looping through each record.

For Each dgi As DataGridView In DataGridView1.Rows

Dim productCode As String = DirectCast(dgi.FindControl("product"), Label).Text
Dim description As String = DirectCast(dgi.FindControl("description"), Label).Text
Dim quantity As String = DirectCast(dgi.FindControl("order_qty"), Label).Text

[cODE].....

View 7 Replies

Multilingual Database Design In Sql?

Jan 11, 2012

Need a procedure in SQL for translate a datatable in English to Arabic .I am having English table which is having category ID ,Code etc upto 25 columns in the SQL Database.We want to translate this table to arabic when user opts for Arabic .So need a procedure to convert this English table to Arabic.Do i want to use google translator for this case . Then how will it is linked with database .

View 1 Replies

Database Application Design Recommendations?

Mar 22, 2012

The main purpose of the my app that I need your help with is, to deliver an always (or close to) up to date a list of files for the user to choose from for a variety of common purposes. For instance, opening the selected file in its native client editor application so the user can make changes. Another purposes would be to print the file, and I have others.

If nothing else (meaning recommendations for a better design that still keep my desired in mind) I'd like ideas on how to update my complex DataSet (background processing options, what's the most efficeient/quickest way to update my DataSet) as the list of files changes while my app is running and my app is designed to never close due to the long amount of time it take to load it initially.

The list must be always kept up to date while my app is running because not only the intial loading of data takes a lot of time but updates (new/modified/deleted) could potentially take too long depending on not only how much data to update/add (new files) but how efficeient my code is in updating the list. To be perfectly clear: If a new file is created then it need to be somehow (automatically preferably or manually i.e. button code) add to the list. If a file is deleted then it needs to bet removed from the list. And if the file has changed, perhaps some of it metadata or thumbnail image have changes so update the file's data in the list. All of which (new/modified/deleted) need to be as real-time as possble without degrading the server too much and without the user waiting more than a handful of seconds.

Listing all the files as quick as possible whether that be with or without metadata initially is very important because most of the time the user is going to filter (or scroll the list by typing) for a partial file name. Once the user filters/scrolls to the desired file there's a very good chance that he/she isn't even interested in the metadata, most of the time the user wants my app to open the selected file in its native client editor application so he/she can view or modify the file. The initial
load time of the data doesn't concern me as much as updates because the user can possibly do other things while it initially loads all the data as long as it not too long (more than a few minutes). From there the updates will either be automatic if possible (most desirable from a users standpoint) or the user initiated (e.g. button). Plus I'm thinking the updates might need to be done with a few different background processes (multiple threads) because I think I need one for periodic updates (e.g. every
15 minutes) and one background process for page updates meaning whatever the user has either scrolled to or filtered for, more accurately all files currently display to the user will be systematically update in the background so the user can still operate my app.

I'm currently using SqlDataAdapter.Fill to fill a DataSet object variable (which is bound [BindingSource] to a DataGridview control) to first populate the DataSet from the SQL query and then prorgammatically adds records (DataRow) for local files but please make recommendations. I don't mind big changes or starting over if necessary, I just want the best app possible based on the aforementioned criteria. I'm not sure if it complicates matters but I've also added custom columns in the DataSet for some special needs (thumbnail of files, booleans for tracking custom statuses). For the local files I'm currently populating the DataSet prorammatically (iterating a path/file string collect made by System.IO.Directory.GetFiles) since the list is first (and very quickly) populated with Vault files (which is always a far larger list than the local files) so . Again, I don't have to take this direction, make recommendations.

View 11 Replies

Design Id Card Using Data From Database?

May 18, 2012

i try using both detail view and form view but they are not flexible enough to place my picture where i want it

View 1 Replies

Design Pattern For Database Interaction?

Mar 12, 2012

I've been studying design patterns off-and-on now for a project I've recently been working on. I've been fortunate with this last one not to have to work with databases, but will soon have an opportunity.

View 8 Replies

Sql Server :: Database Design And Normalization?

Mar 29, 2011

I am developing an "AddressBook" like project in VB.NET. While developing database in SQL Server2005, i want to follow the principals of normalization and keep its degree of normalization as high as possible. Fields i am using are these.

Create table AddressBook_Contact
(
Contact_ID int Primary Key,FirstName varchar(15),MiddleName varchar(15),LastName

[code]......

View 3 Replies

[OOD] Class Design For With Database Back End

Feb 6, 2010

I was hoping that I could get some guidance from some of you guys on Object Design with Database back ends. I am trying to build what could be considered to be my first full scale application, which is a student tracker (simplification). While I have a reasonable idea of how I would go about designing the classes for the system, the bit that I don't know how to do is, how I would go about getting the data to and from the database.

For example with my other applications, I have done a couple of things;

1) Gathered all the data when the application started up, creating the objects then. Then when the application closed sending the data back to the database.

2) Have the code which deals with getting the data in the specific class, so the student class for example would take only one constructor argument which would be the studentID, then the class code would connect to the database and populate the object fields as appropriate.

3) Variations of the above. I have also looked into LINQ, which seems like it would be very useful if you don't expect your classes to deal with any business logic and just data, but I suppose it would be possible to create a wrapper class that would include the business logic.

[Code]....

View 1 Replies

[OOD] Class Design For With Database Back End?

Mar 11, 2010

I was hoping that I could get some guidance from some of you guys on Object Design with Database back ends.I am trying to build what could be considered to be my first full scale application, which is a student tracker (simplification). While I have a reasonable idea of how I would go about designing the classes for the system, the bit that I don't know how to do is, how I would go about getting the data to and from the database

View 3 Replies

Simple Looping - Create Multiple Form Fields For Each Entry In Underlying Database Table

Nov 24, 2009

I am trying to create a form which will be fed by an underlying database to create multiple form fields for each entry in an underlying database table. This is for a program to monitor patients under anesthesia, and prior to surgery, the doctor will choose which monitors they will be using. Then, on the actual monitor screen which will pop up every X minutes, there will be a text box and a check box for each chosen monitor. I am relatively new to VB, so I have tried to illustrate what I am needing but using the logic that I know from my previous life in PHP.

I am using DevExpress's layout control to place the form fields, so that is the code in the middle of the first loop (on_load), and I know that part works, I just need to know how to name the fields and then recover those fields and commit the values to the database. (the text boxes are added to the database, the check boxes are used to determine if an entry is made for that monitor- i.e. at the end of surgery if a monitor is turned off). I know that my syntax for naming the fields is no where close to correct, and it probably would not work in PHP, but I remember doing something like this in a PHP application I built long ago. [Code]

View 3 Replies

Create Database User Interface Design?

Mar 31, 2012

I am designing a database using access 2010 and I ve been asked to design the user interface with Visual basic.I actually have designed tables and their relationship and did some queries according to the requirements. how do I create user interface in VB from this point knowing I don't have any form and report designed in access?

View 6 Replies

Design Approach For Utilizing Data From A Database

Nov 6, 2011

There exists a database that holds information on each planet in the solar system. The database has multiple tables.The program intends to access this data to display it to the user in a variety of manners. The program does not intend to manipulate the data at its source, though calculations on two fields may be performed to determine certain display characteristics.What is the optimal method for accessing the data?My initial approach, (read: gut feeling, no research) was to take each related row of data from the database and create an object of a custom class based on the data. So you might wind up with:[code]Then use these objects to perform whatever actions the program needed to. I ran into a lot of problems trying to implement this, so that I believe my design approach is fundamentally flawed.

View 1 Replies

Screen Interface And Database Design View?

Apr 3, 2012

I am using visual studio 2008 professional edition, and i need some help in my assignment project.below are my screen interface and my database design view, relationship view, and coding and this is my coding Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

[Code]...

View 3 Replies

Updating MS Access Database From Design View?

Mar 11, 2010

:( I am have been trying to update changes from my vb.net program to an access database file and it simply will not work. I have am using table adapters. I'm not familiar with SQL so i can't go that route. It updates the dataset fine but not the database...

I have pasted my code below.
Private Sub BooksBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BooksBindingNavigatorSaveItem.Click

[code]....

View 1 Replies







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