-
Nov 6th, 2002, 11:19 AM
#1
Thread Starter
Member
How to insert values without knowing field names
I want to Insert Values into an existing record of an SQL table, without knowing the field names.
Normally I do the following :
"INSERT INTO tblA ([User],[Date]) VALUES ('A','B') WHERE <condition>"
....but in this instance I don't know the field names ([User],[Date]), I merely want to insert the values into the 2nd and 3rd fields.
-
Nov 6th, 2002, 11:24 AM
#2
Addicted Member
You could use the fields collection of the recordset:
VB Code:
rs.Fields(0) = "Hello World"
-
Nov 6th, 2002, 11:25 AM
#3
Frenzied Member
Why wouldn't you know where you are putting the data? Can you just create a stored procedure then you have...
VB Code:
strSQL = "usp_ProcedureName 'A','B'"
seoptimizer2001
VB 6.0, VC++, VI, ASP, JavaScript, HTML,
Perl, XML, SQL Server 2000
If God had intended us to drink beer, He would have given us stomachs.
Please use the [code] and [vbcode] tags in your posts!
If you don't know how to use them please go HERE!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|