Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2004, 05:41 PM
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Auto-increment using VBScript

I use a product called OCR for Anydoc that uses VBScript to perform non-out-of-the-box database instructions.

What script could I write to make a number appear in a text input field from an Access database? This number would auto-increment each time the form was opened from a browser (tricky.)

One example script from the text is


If Text1.Value = False Then
    ConnectionObject.BeginInsertTransaction
    ConnectionObject.FieldValue (Text1) = Text1.Value
    ConnectionObject.ExecuteTransaction
End If

I don't understand the ConnectionObject portion and the software company won't describe it for me. I tried {odbc conn name}.{table name}.{fieldname}, but I get an error message.

Any suggestions or help would be great.

 
Old April 6th, 2004, 02:17 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

You may want to ask this in the appropriate forum

http://p2p.wrox.com/forum.asp?FORUM_ID=70

Quote:
quote:Originally posted by CraigKornacki
 I use a product called OCR for Anydoc that uses VBScript to perform non-out-of-the-box database instructions.

What script could I write to make a number appear in a text input field from an Access database? This number would auto-increment each time the form was opened from a browser (tricky.)

One example script from the text is


If Text1.Value = False Then
    ConnectionObject.BeginInsertTransaction
    ConnectionObject.FieldValue (Text1) = Text1.Value
    ConnectionObject.ExecuteTransaction
End If

I don't understand the ConnectionObject portion and the software company won't describe it for me. I tried {odbc conn name}.{table name}.{fieldname}, but I get an error message.

Any suggestions or help would be great.

Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding auto increment of id Rajesh225 ASP.NET 1.0 and 1.1 Basics 1 June 27th, 2007 05:35 PM
Auto increment prad_a MySQL 3 April 7th, 2007 05:47 AM
How to auto increment ? Shawn Mohan SQL Server 2000 2 June 22nd, 2006 03:00 AM
How to auto increment? Shawn Mohan ASP.NET 2.0 Basics 6 June 20th, 2006 10:36 PM
auto increment? hosefo81 PHP Databases 1 February 2nd, 2004 03:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.