Click here to Skip to main content
16,004,927 members
Home / Discussions / Database
   

Database

 
GeneralRe: concatenate recordset into one row Pin
airbus38024-Aug-05 22:34
airbus38024-Aug-05 22:34 
GeneralRe: concatenate recordset into one row Pin
JKroschel25-Aug-05 4:28
JKroschel25-Aug-05 4:28 
GeneralRe: concatenate recordset into one row Pin
Davene31-Aug-05 8:14
Davene31-Aug-05 8:14 
GeneralRe: concatenate recordset into one row Pin
airbus38031-Aug-05 11:45
airbus38031-Aug-05 11:45 
GeneralRe: concatenate recordset into one row Pin
Davene31-Aug-05 12:20
Davene31-Aug-05 12:20 
GeneralSQL Mail Pin
samoore23-Aug-05 6:09
samoore23-Aug-05 6:09 
GeneralRe: SQL Mail Pin
samoore23-Aug-05 7:32
samoore23-Aug-05 7:32 
GeneralProblem with Update ADO record through VBS Pin
IFriendly23-Aug-05 4:20
IFriendly23-Aug-05 4:20 
Hello All!

I have some problem when i try Update record in opened Recordset in VB Script. Windows 2000Pro SP4,MDAC2.7SP1,VBS5.6,SQL2000SP3.
Table:
CREATE TABLE [dbo].[Table1] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Title] [varchar] (255) NULL ,
) ON [PRIMARY]

Table have an auto-incriment ID and 1 varchar field.
After execute Update method record must have filled ID field.
But in following example this did't appear:
....

Set Conn2 = CreateObject ("ADODB.Connection")<br />
Conn2.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Test;Data Source=127.0.0.1;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=W2000;Use Encryption for Data=False;Tag with column collation when possible=False", "","" <br />
Set rs2 =  CreateObject ("ADODB.Recordset")<br />
rs2.Open "Table1", Conn2,adOpenKeyset, 3, adCmdTable<br />
   Rs2.AddNew<br />
    Rs2("Title") = "Some text"<br />
   Rs2.Update<br />
WScript.StdOut.WriteLine "Added New Record: "  &Rs2("ID")&    " "   &Rs2("Title") ' ID = NULL!!!
....
Somebody can me explain why this did not work in VBS and CORRECTLY executed and UPDATED in MCVC 6.0 SP4.
Thank for all who can help me understand this situation.


IFriendly
GeneralT-SQL Problem Pin
WDI23-Aug-05 2:45
WDI23-Aug-05 2:45 
GeneralRe: T-SQL Problem Pin
Colin Angus Mackay23-Aug-05 3:13
Colin Angus Mackay23-Aug-05 3:13 
GeneralRe: T-SQL Problem Pin
WDI23-Aug-05 4:27
WDI23-Aug-05 4:27 
GeneralRe: T-SQL Problem Pin
Colin Angus Mackay23-Aug-05 4:54
Colin Angus Mackay23-Aug-05 4:54 
GeneralRe: T-SQL Problem Pin
Frank Kerrigan23-Aug-05 4:16
Frank Kerrigan23-Aug-05 4:16 
GeneralFiltering and Paging Pin
WDI23-Aug-05 2:11
WDI23-Aug-05 2:11 
GeneralRe: Filtering and Paging Pin
miah alom25-Aug-05 10:40
miah alom25-Aug-05 10:40 
QuestionCannot lock record? Pin
Javolin22-Aug-05 14:30
Javolin22-Aug-05 14:30 
AnswerRe: Cannot lock record? Pin
Christian Graus22-Aug-05 14:33
protectorChristian Graus22-Aug-05 14:33 
Questioninsert text truncated in ADO, not in ODBC? Pin
ir_fuel22-Aug-05 11:06
ir_fuel22-Aug-05 11:06 
AnswerRe: insert text truncated in ADO, not in ODBC? Pin
toxcct22-Aug-05 20:23
toxcct22-Aug-05 20:23 
GeneralRe: insert text truncated in ADO, not in ODBC? Pin
ir_fuel22-Aug-05 22:28
ir_fuel22-Aug-05 22:28 
AnswerRe: insert text truncated in ADO, not in ODBC? Pin
Rob Graham23-Aug-05 2:32
Rob Graham23-Aug-05 2:32 
GeneralAccess tables providing only 65636 rows Pin
softty22-Aug-05 10:07
softty22-Aug-05 10:07 
GeneralRe: Access tables providing only 65636 rows Pin
softty28-Aug-05 7:50
softty28-Aug-05 7:50 
GeneralUPDATE the first n matching records Pin
Luis Alonso Ramos22-Aug-05 5:36
Luis Alonso Ramos22-Aug-05 5:36 
QuestionWhat does .net stand for? Pin
Tuwing.Sabado22-Aug-05 1:40
Tuwing.Sabado22-Aug-05 1:40 

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.