Or try defining the ID column as an auto-incrementing field. You'll lose the sequence of the numbers, but you'll maintain uniqueness. Then you could use something like a timestamp field to determine the order in which records were added. That is:
Start a transaction
Add a new record - the...
Thanks for the reply. Problem is I get an 'object required' error when I try to use it like I do below:
Printer.Duplex = 2
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
/Cy
Thanx! Your explanation makes sense. VB's poor handling of sequential files doesn't. Oh well - someday I guess we'll all create relational databases for even the simplest little sequential process... >:-<
An old mainframe programmer, I'm used to the concept of records and record layouts when processing sequential files. Why can't I define a record type in VB like:
Type MyRecordLayout
RecordID as String * 6
FirstName as String * 20
etc, etc
End Type
Dim InputRcd as MyRecordLayout
Line...
I'm writing a little snippet of code to print all Excel sheets in a folder - could be something like 30 sheets at a time. I've got a printer that's duplex capable - the problem is I can't figure out how to get that mother to actually print on both sides from within the code.
I've seen...
I have a large SQL Server database that I access via MS Access. What I'd like to do is execute a stored procedure, passing parameters from a user form. Kinda like:
PARAMETERS Forms!Main!fromdate DateTime, forms!main!todate DateTime;
EXEC sp_Total_Time_For_Period...
Thanks a lot, reidfl. Very helpful. :-( Now, if there's anybody out there who knows how to retrieve a TEXT field from SQL Server into a textbox, I'd be very grateful...
I'm trying to retrieve a field of the type 'TEXT' from an SQL server database and can't figure out how to do it. I've written a syntactically correct stored procedure that I can execute and get the text in Query Analyzer, but it won't return any records in VB, and if I try to open a recordset...
I have a number of apps that can run unattended (in theory) - they collect statistics from other systems and produce reports, among other things. I also have an app that runs once an hour to generate fresh statistics for a customer accessible web site. There are a number of things that can go...
Hi again!
I tried almost that - I used ExitProcess instead, and it does seem to do the trick. I'm worried about what's left in memory, though - does that function unload all forms and modules read into memory, for instance? (If you're interested in what batch scheduler I'm using, by the way...
The whole picture is this:
I wish to run a sequence of programs in batch mode - producing reports, aggregating data and so forth. Some of these programs are dependent on the successful execution of a previous one. So let's say program 1:s task is to establish contact with a remote server and...
Hi!
I tried setting different return codes in my VB app (so I can take appropriate actions when/if it fails), and I tried using the SetLastError function, but the app still seems to return 0, regardless of what happens... Clues, anyone?
/Cy
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.