Click here to Skip to main content
15,892,005 members
Home / Discussions / Database
   

Database

 
GeneralRe: Database recovery Pin
Bruce Duncan4-Apr-03 23:41
Bruce Duncan4-Apr-03 23:41 
GeneralRe: Database recovery Pin
pradipta5-Apr-03 0:44
pradipta5-Apr-03 0:44 
GeneralRe: Database recovery Pin
Bruce Duncan5-Apr-03 7:39
Bruce Duncan5-Apr-03 7:39 
GeneralRe: Database query Pin
pradipta4-Apr-03 19:36
pradipta4-Apr-03 19:36 
QuestionTextual dumps possible in SQL Server? Pin
Smitha Nishant4-Apr-03 17:40
protectorSmitha Nishant4-Apr-03 17:40 
GeneralAutonumber into Access Pin
MemLeak4-Apr-03 8:00
MemLeak4-Apr-03 8:00 
GeneralRe: Autonumber into Access Pin
Chris Meech4-Apr-03 10:16
Chris Meech4-Apr-03 10:16 
GeneralRe: Autonumber into Access Pin
Waleed Eissa6-Apr-03 2:26
Waleed Eissa6-Apr-03 2:26 
Well, I understand that you use ADO to insert the new record. The following code is stripped from VB code generated by the data form wizard in VB (with some changes), if you look at the code you'll find that no value was entered for the AutoNumber field, so I assume that if you use the INSERT command without specifying a value for the AutoNumber field it should work too (try it on your own).

There is an AutoNumber field customer_id which doesn't appear in the code, the value of that field is assigned automatically.

' ASSUMING YOU ALREADY HAVE A CONNECTION OBJECT db
'

Dim strSQLQuery As String
strSQLQuery = "SELECT Customer.* FROM Customer"

Set tblCustomer = New ADODB.Recordset
tblCustomer.Open strSQLQuery, db, adOpenStatic, adLockOptimistic

tblCustomer.AddNew ' HERE YOU ADD A NEW RECORD

tblCustomer!customer_name = "John"
tblCustomer!district_code = 55
tblCustomer!industry_code = 17
tblCustomer!entity_type_code = 12
tblCustomer!branch_code = 5

f_tblCustomer.Update


(a.k.a. Wal2k)
www.wal2k.com

GeneralBeginner Question Pin
Brent Corkum4-Apr-03 5:16
Brent Corkum4-Apr-03 5:16 
GeneralRe: Beginner Question Pin
Anonymous4-Apr-03 5:58
Anonymous4-Apr-03 5:58 
GeneralSQL Server -> trigger -> event -> caught by C# program Pin
zoltan_ie4-Apr-03 0:23
zoltan_ie4-Apr-03 0:23 
GeneralMystery of the Vanishing Field Data Pin
J. Dunlap3-Apr-03 16:57
J. Dunlap3-Apr-03 16:57 
GeneralPrimary Key Pin
Anthony98873-Apr-03 15:49
Anthony98873-Apr-03 15:49 
Questionhow to access msde Pin
ajaykalekar3-Apr-03 8:17
ajaykalekar3-Apr-03 8:17 
AnswerRe: how to access msde Pin
Alexander Kojevnikov4-Apr-03 5:09
Alexander Kojevnikov4-Apr-03 5:09 
GeneralAdding records:O) Pin
MemLeak3-Apr-03 5:01
MemLeak3-Apr-03 5:01 
GeneralRe: Adding records:O) Pin
Alexander Kojevnikov4-Apr-03 5:13
Alexander Kojevnikov4-Apr-03 5:13 
GeneralEmpty fields Pin
MemLeak3-Apr-03 2:36
MemLeak3-Apr-03 2:36 
GeneralLarge Field size (>64k) Pin
Ryan Binns1-Apr-03 19:30
Ryan Binns1-Apr-03 19:30 
GeneralRe: Large Field size (>64k) Pin
Hesham Amin1-Apr-03 22:35
Hesham Amin1-Apr-03 22:35 
GeneralDatabase query Pin
pradipta1-Apr-03 19:24
pradipta1-Apr-03 19:24 
GeneralRe: Database query Pin
Alexander Kojevnikov1-Apr-03 21:01
Alexander Kojevnikov1-Apr-03 21:01 
GeneralRe: Database query Pin
pradipta1-Apr-03 21:43
pradipta1-Apr-03 21:43 
GeneralRe: Database query Pin
Jeremy Oldham2-Apr-03 1:28
Jeremy Oldham2-Apr-03 1:28 
GeneralRe: Database query Pin
pradipta3-Apr-03 21:42
pradipta3-Apr-03 21:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.