vb5prgrmr 143 Posting Virtuoso

With the use of the DateDiff function and either the time function or the now function, and you can look these up in vb's help. The timer control is in the toolbox of the standard exe project and placing one on your form, selecting it, and pressing F1 will allow you to read all about it.

Good Luck

vb5prgrmr 143 Posting Virtuoso

#1 Define your requirements in excruciating detail
#2 Define the technology to be used (VB6/VB.NET 2k2,2k3,2k5,2k8/Delphi/Access/SQL/Text/Other/Other)
#3 Design your GUI with explanations on how each item/control is supposed to work
#4 Then come back with specific questions

e.g.
How to connect to access database
How to retrieve records/update records/daily sales etc.
How to interface/incorporate a barcode scanner into my application
How to interface with a card reader for credit card sales
How to interface with XXX type cash drawer via serial/usb etc.

Good Luck

vb5prgrmr 143 Posting Virtuoso

See my answer to you at vbforums.com

vb5prgrmr 143 Posting Virtuoso

Well your query string would be something like...

SQLString = "Select Top 1 ClosingStock From YourTable Order By UniqueAutoNumberID DESC"

Then you execute it via your data access method (RDO/DAO/ADO) and retrieve the value (check first if you have actually retrieved a record though and if not then forwarding balance (closingstock) would equal zero).

Good Luck

vb5prgrmr 143 Posting Virtuoso

Are you looking for function in Oracle? Or from vb you can use the Now function to put the date/time into a variable that you can use as an update/insert into oracle.

Good Luck

vb5prgrmr 143 Posting Virtuoso

WELLLL..... If this is a transaction table, and you have an autonumber for a unique primary key, then...

There are several ways in which to solve your problem, the following in only one way...

Based upon the first sentance in the hopes that you have a unique primary key you could, as you record each transaction, select top one based upon product id ordered by unique key desc. This will retrun the last recorded transaction and this will tell you the ending balance/quantity of the product in question. Then with that information you can add a new record with your current transaction information with the addition/subtraction to the inventory.

Well, I hope you understood that :)

Good Luck

vb5prgrmr 143 Posting Virtuoso

I believe, that once you purchase the product/download the free trial/either way, there should be samples for you to learn from but on the other hand I just downloaded the SDK from Adobe for free, and the last time I did this so many years ago, they had many examples. The link is...

http://www.adobe.com/devnet/acrobat/index.html?navID=downloads

However, not having looked at this SDK version I can only tell you from my memory of the previous version I used and it was not simple.

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

See my post in thread... (#4)

http://www.daniweb.com/forums/showthread.php?t=181952

Good Luck

vb5prgrmr 143 Posting Virtuoso

mizkhyz,

This thread is nearly two years old! In the future please start your own thread and if need be reference previous thread by copying and pasting the link in your thread. Also, it would help if you pasted the link to the php page you need help with as there could be a couple of different ways to solve your problem.

vb5prgrmr 143 Posting Virtuoso

Check out...

http://www.quickpdflibrary.com/promotions/landing1-pdf-vb-activex.php

Click on Overview
Click on Help Manual (Online) < Located in grey box to right
Click on Extraction
Click on DAExtractPageText

Seems like it should do the trick for you.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Input past end of file means that you are trying to read more than the file contains. In help, on the index tab, type in input keyword and select Input # Statement.

Good Luck

vb5prgrmr 143 Posting Virtuoso

In visual basic 6.0, of which you have posted your question in the wrong forum, public form variables are access via form1.variablename

Good Luck

vb5prgrmr 143 Posting Virtuoso

Use PDW to distribute your apps...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Hello everyone, please i need your help very urgently. I am working on a data management application and am using the data control and the standard report system.

The following is an example of data collected.

Name Age Birthday ( Day/Month) , Gender

Samuel 23 2/5 Male
John 22 3/5 Male
Peter 20 3/6 Male
Shiella 28 4/7 Female
James 22 5/7 Male

1. I wont to be able to enable the user to sort out all males or all females from the database onto the report sheet.
That is when the search finds the string male in any table its adds the name like this:
Name Gender
John Male

In any table? Well then, lets start with a short discussion about database normalization. If you have multiple tables that contain the same information then you need to do a search on "Database Normalization". The short version of what you will read is that all like data should go in only one place.

SELECT * FROM YourTableName WHERE Gender = 'Male'

2. And lastly i want to be able to sort out birthdays providing the user input fields like this


SEARCH BIRTHDAYS BETWEEN

Day Day Month

01 to 05 April

and displaying it on a report sheet. Please help me. I will be very grateful if any body could help me out with this. Thank you.

You have the right keyword "BETWEEN" however most databases include the year in date …

vb5prgrmr 143 Posting Virtuoso

Do you have the code to open a database? Do you have the code to select what you want from the database? Do you want to keep the native database format or are you wanting to export it to something like a .CSV file? Are you looking to be able to back a database up? What code do you have? Please show us so we can help you help yourself.

vb5prgrmr 143 Posting Virtuoso

Not having done such a thing, I can only guess from what I have read from other posts.

You will need to run the install as admin (right click run as). Then if you are able to get it to install, install everything.

However if you are not able to get it to install successfully, then I would suggest 2005 or 2008 express editions...

http://www.microsoft.com/downloads/en/results.aspx?freetext=sql+server&displaylang=en&stype=s_basic

Good Luck

vb5prgrmr 143 Posting Virtuoso

Because they are faster, more stable, and closer to the native API for each because that is what they are built from. If you run a trace on your ADO driver you will find that it calls the DAO or RDO drivers that you feel so sorry about. Perhaps you should read more and know what you are talking about before you post such uninformed opinions debasisdas.

As a matter to point out such to you debasisdas have you ever seen...

db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=...

Guess what debasisdas, the jet driver or dao driver is being called from the ADO driver.

And by the way debasisdas, since when is it bad to know more than just one technology? I feel sorry for those who limit themselves to just one technology whether it is from ignorance or stubbornness.

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

You can save yourself a lot of time and code by using an array of option buttons instead of check boxes...

Private Sub Option1_Click(Index As Integer)
Text1.Text = Option1(Index).Caption
End Sub

and that is all the code you need...

Good Luck

vb5prgrmr 143 Posting Virtuoso

You need to use ADO with any database of your choice for optimal performance.

optimal performance!!!???

ADO is a wrapper for both DAO and RDO and thus is slower (Check documentation) because it adds another layer of calls, callbacks, and checks. For optimal performance there is a set of API's to call drivers natively but that is so much of a hassle the next best thing is to use DAO for Access or any of the flavors of dBase (includes Fox Pro as Fox Pro uses the dBase engine!) and RDO for MySQL, Sybase, SQL Server, Oracle and such.

Also ADO and any of the following technologies were created to "standardize" the interface for database access, of which you will also read in the documentation of ADO.

vb5prgrmr 143 Posting Virtuoso

If I remember correctly, you do not need to register the dlls but if you do the website I gave you should have the information you need.

Good Luck

vb5prgrmr 143 Posting Virtuoso

With the single ticks ' surrounding your date, you are telling the database that you are passing a string. Try removing the single ticks or surrounding the date with # signs.

Good Luck

vb5prgrmr 143 Posting Virtuoso

ODBC and ADO (and DAO, DAO ODBC Direct and RDO) are data access methods while MySQL, Access, SQL, ORACLE are databases. Now if you have MySQL running then check out http://www.connectionstrings.com for connecting to your database. Once that is done, then we may be able to help you further.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay then, without knowing the IP then what are your options? Enumerate through each and every IP until you get the responce you are expecting? You may have to involve another computer to accomplish what you want if you are wanting to do something like a chat program. However, you may be able to accomplish what you want if you want to use email, specifically POP3.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Outlook, Outlook Express, Other? If outlook then search the web for automating outlook vb 6.0.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Check out the split and join functions in vb's help files.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Type in datediff and press F1 and do the same for Open, SaveSetting, GetSetting, and then search the web for examples on the API's CreateFile and GetFileTime.

Good Luck

vb5prgrmr 143 Posting Virtuoso

start a new project for a test project. Add a MSFlexGrid and name it FG, add a command button, add the code, run, test,

Option Explicit

Dim NumberOfRows As Integer

Private Sub Form_Load()
FG.AddItem "1", 1
FG.AddItem "2", 2
FG.AddItem "3", 3
FG.AddItem "4", 4
FG.AddItem "5", 5

FG.Row = 0
FG.Col = 1
FG.Text = "Search Key"

FG.Row = 1
FG.Col = 1
FG.Text = "abc"

FG.Row = 2
FG.Text = "bcd"

FG.Row = 3
FG.Text = "asdf"

FG.Row = 4
FG.Text = "qwerty"

FG.Row = 5
FG.Text = "zxcv"

FG.Row = 0
FG.Col = 2
FG.Text = "Update Value"

FG.Row = 1
FG.Text = "Orig value"

FG.Row = 2
FG.Text = "Orig value"

FG.Row = 3
FG.Text = "Orig value"

FG.Row = 4
FG.Text = "Orig value"

FG.Row = 5
FG.Text = "Orig value"

NumberOfRows = 5

End Sub

Private Sub Command1_Click()

Dim ForLoopCounter As Integer, Found As Boolean, SearchValue As String

FG.Col = 1
SearchValue = "qwerty"

For ForLoopCounter = 1 To NumberOfRows
  FG.Row = ForLoopCounter
  If FG.Text = SearchValue Then
    FG.Col = 2
    FG.Text = "New value"
    Found = True
    Exit For
  End If
Next ForLoopCounter

If Found = False Then
  NumberOfRows = NumberOfRows + 1
  FG.AddItem CStr(NumberOfRows), NumberOfRows
  FG.Row = NumberOfRows
  FG.Col = 1
  FG.Text = SearchValue
  FG.Col = 2
  FG.Text = "Orig value"
End If

FG.Col = 1
SearchValue = "test"
Found = False

For ForLoopCounter = 1 To NumberOfRows
  FG.Row = ForLoopCounter
  If FG.Text = SearchValue Then
    FG.Col = 2
    FG.Text = …
vb5prgrmr 143 Posting Virtuoso

If it is a legal copy then MS might be able to help or some antivirus software suites can check disks and I mention this because it seems that MS OS's seem to try to write the FAT back to the disk thus creating two FAT's for the disk.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Did you even try to follow the instructions? The instructions are not only how to learn how to start navigating through the help files, but also if you would have followed them and read the pages you would now understand how to read and save data to a file.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay,... Just a couple of points here...

To begin with so you do not have to load, clear, and then reload you list box, I would suggest you add another listbox or some other control and load the information into it only one time. Then make that contol invisible (visable=false). See example...

Option Explicit

Private Sub Form_Load()
List1.Visible = False
List1.AddItem "abc"
List1.AddItem "aba"
List1.AddItem "aab"
List1.AddItem "abh"
List1.AddItem "bbj"
List1.AddItem "oft"
End Sub

Private Sub Text1_Change()
Dim MyArray() As String, ForLoopCounter As Integer
If Trim(Text1.Text) = "" Then
  List2.Clear
  Exit Sub
End If
List2.Clear
For ForLoopCounter = 0 To List1.ListCount - 1
  If Left(List1.List(ForLoopCounter), Len(Text1.Text)) = Text1.Text Then
    List2.AddItem List1.List(ForLoopCounter)
  End If
Next ForLoopCounter
End Sub

Good Luck

vb5prgrmr 143 Posting Virtuoso

In this simplistic example, the "Info 1" (2-3) is what you are searching for while the "1"/"2"/"3" could be considered as your row numbers.

Dim C As New Collection, FoundItem As Boolean, ForLoopCounter As Integer
C.Add "Info 1", "1"
C.Add "Info 2", "2"
C.Add "Info 3", "3"

For ForLoopCounter = 1 To C.Count
  
  If C.Item(ForLoopCounter) = "Info 2" Then
    
    FoundItem = True
    Exit For
    
  End If
  
Next ForLoopCounter

So what you are saying is that you would search on the item and if found you would know which row it was in because of the loop counter.

Just remember to add them to the collection the say way you added them to the grid.

Then again, why can you not search the grid itself?

Good Luck

vb5prgrmr 143 Posting Virtuoso

For the most simplistic version you could check the creation date of some file you created against the now function, do a date diff based on "d" (day) and if >= 365 display message/shutdown program. However, user could get around this by resetting the date time on the machine. Same goes for using the registry or placing date info in some file.

Now, what may be harder for the user to get around is a count of how many times your program has run as you could hide this count in the registry, in a file, and if you wanted you could attach it to a file on an NTFS drive as in adding a property to a file. Then you could check the count in all three places and see if use has tampered with anyone of the counts. More than likely, a determined user would find the registry setting, file contents, but once they found that file, would they check the properties of that file?

No, real guarenteed way, but many different ways.

Good Luck

vb5prgrmr 143 Posting Virtuoso

goto http://www.vbaccelerator.com

search zip

They have both the zip and unzip dlls with vb source code projects.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Actually some Biometric hardware allows you to access the the data from the scanning device directly without needing to write one line of code (like a barcode reader) but others need you to add in a reference to their activex while others have no interface for the programmer. Before you even buy a thumbprint scanner, do a search on google/yahoo and check out the options and manufacture's website.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes you can! Made a program and all. As long as you are not trying to preserved the data within the array you can dimension it to any lbound and ubound you want. However, if you are talking about the string then integer then you are correct. That is my typo.

vb5prgrmr 143 Posting Virtuoso

Don't know if it will help... but do your object have a close method or other house keeping call you can make before you set them to nothing? Or if you are worried about your form staying up, just add a me.hide before you do your current code.

Good Luck

vb5prgrmr 143 Posting Virtuoso

No. You can only redim the last element of an array...

Technically speaking...

Similarly, when you use Preserve, you can change the size of the array only by changing the upper bound; changing the lower bound causes an error.

which means

Dim MyString() As String
Redim MyString(0 To 1) As Integer
Redim MyString(1 To 2) As String

would work... but...

Dim MyString() As String
Redim MyString(0 To 1) As Integer
Redim [b]Preserve[/b] MyString(1 To 2) As String

would thrown error #9 subscript out of range

Good Luck

vb5prgrmr 143 Posting Virtuoso

Biometrics, covers a lot of territory from thumbprint scanners, hand scanners, facial recognition, iris recognition, retina recognition, voice recognition...

Just what kind of biometric scanner are you talking about? Who makes it? Do they have a developers corner or some such on their website? Is their policy their program or no program?

Or are you looking for such equipment and have nowhere to start?

If so, use google/yahoo and search on biometrics.

Good Luck

vb5prgrmr 143 Posting Virtuoso

use the LockWindowUpdate just prior to adding items to lock the control and then call it again after the loop to to reenable it

Good Luck

vb5prgrmr 143 Posting Virtuoso

what OS? What control?

vb5prgrmr 143 Posting Virtuoso

waynespangler & KSS,

Gentlemen/Ladies,

Unfortunantly you are both wrong. The data control can connect to text files.

MrMie,

You need to set up your databasename to the folder that contains the text file (app.path). Then setup the recordsource to the name of the file (no extension as you are using the dao/jet text driver) (recordsource = "mytext"). However, in the properties you have to set the connect property to Text;.

Good Luck

vb5prgrmr 143 Posting Virtuoso

name oldfile as newfile

will do the same...

Good Luck

vb5prgrmr 143 Posting Virtuoso

okay, in vb's help, on the index tab, type in "print" then in the list you will see "print # statement", highlight it and hit enter or double click on it, select "print # statement" to read all about it. Check out the example.

Then click on "see also" and select "open statement" to read all about it. View the example.

Then click on "see also", select "close statement" to read all about it. See example...

Next click on the back button to take you back one page to the open statement and click on "see also" again but this time select the "freefile function".

Now type in "line i" and hit enter. this should bring you to the line input # statement, see example, see also input # statement, example, see also, input function, example and....

Well, from there you should have all the information you need to write (print) out files and read them back in.

Good Luck

vb5prgrmr 143 Posting Virtuoso
If toclear Like "1" Then

what if there is more than one control without a caption... you should...

if toclear>0 then

Good Luck

vb5prgrmr 143 Posting Virtuoso

I have never tried this while using ADO but I do know that DAO does not care what the extension of the file is as it checks for the contents of the file, i.e. change databasename.mdb to databasename.abc. and even with the password this is easy enough to get around by a determined user.

Another way is to encode the file is by something like RSA encryption algorithms. This method would be real secure while your program is not running but when it is there is nothing you can do. I say there is nothing you can do because there are so many programs out there that can watch the system that when you go to write the database to disk even with a fake extension, the user will know what, when, and where you are doing your actions. Then when you open the database these systems/programs will also notify the user of every string/command/byte passed back and forth between the program/db engine/database that they will easily read the password. Then all they have to do is to stop your kill command to delete the decoded database when you are exiting your program and then they will have access to it and all its data.

So in the end, there is only so much you can do but no matter which way you go...

Good Luck

vb5prgrmr 143 Posting Virtuoso

There are several ways in which to hold/keep information between activations of your program. There is the registry, database, or simple text file just to name a few. Now, using a text file to save/read information is the easiest but we need to know exactly what you want to do to really help you...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Normally, you would refresh the connection/recordset and the bound control would/should show the changes but if not, then you need to use the .refresh method of the control (if it has one) or you need to unbind it, clear it, and then rebind it back to its datasource but without knowing exactly which control you are talking about all of this discussion is just theoretical...

vb5prgrmr 143 Posting Virtuoso

Yes you can use threads in VB but it is not advised. Here is a link to a simple example of using threads in vb by strongm from the http://www.tek-tips.com community.

http://www.tek-tips.com/viewthread.cfm?qid=519374

Look for strongm's post/example that starts with the evil laugh.

As for hkdani's posts, I would suggest that you use either of those suggestions long before you resort to threads in classic vb.

Good Luck