Click here to Skip to main content
15,919,613 members
Home / Discussions / Database
   

Database

 
Questionlooking for a classified package Pin
Rmass2-Nov-05 23:57
Rmass2-Nov-05 23:57 
Questionto list all regestered database servers on a LAN Pin
totu2-Nov-05 19:37
totu2-Nov-05 19:37 
AnswerRe: to list all regestered database servers on a LAN Pin
enjoycrack3-Nov-05 9:20
enjoycrack3-Nov-05 9:20 
Questionstored procedures Pin
totu2-Nov-05 19:31
totu2-Nov-05 19:31 
AnswerRe: stored procedures Pin
André Ziegler3-Nov-05 2:11
André Ziegler3-Nov-05 2:11 
QuestionmySql in my application part 2 Pin
Sasuko2-Nov-05 8:04
Sasuko2-Nov-05 8:04 
Questiondata-bind the DataGrid control to multiple tables in a dataset Pin
cppdotnet2-Nov-05 7:54
cppdotnet2-Nov-05 7:54 
QuestionLicensing questions... Pin
Stanciu Vlad2-Nov-05 6:44
Stanciu Vlad2-Nov-05 6:44 
AnswerRe: Licensing questions... Pin
TheJonzer4-Nov-05 4:41
TheJonzer4-Nov-05 4:41 
QuestionExecuteNonQuery problems Pin
Kuira1-Nov-05 18:35
Kuira1-Nov-05 18:35 
AnswerRe: ExecuteNonQuery problems Pin
miah alom2-Nov-05 5:06
miah alom2-Nov-05 5:06 
GeneralRe: ExecuteNonQuery problems Pin
Kuira2-Nov-05 10:59
Kuira2-Nov-05 10:59 
AnswerRe: ExecuteNonQuery problems Pin
krario2-Nov-05 20:11
krario2-Nov-05 20:11 
GeneralRe: ExecuteNonQuery problems Pin
Kuira3-Nov-05 12:19
Kuira3-Nov-05 12:19 
QuestionSelect with a select Pin
j1webb1-Nov-05 9:54
j1webb1-Nov-05 9:54 
AnswerRe: Select with a select Pin
DiWa1-Nov-05 18:03
DiWa1-Nov-05 18:03 
GeneralRe: Select with a select Pin
j1webb2-Nov-05 3:05
j1webb2-Nov-05 3:05 
QuestionWhat is in SQL Server 2005 Developer Edition Pin
Paul Watson31-Oct-05 22:10
sitebuilderPaul Watson31-Oct-05 22:10 
AnswerRe: What is in SQL Server 2005 Developer Edition Pin
Colin Angus Mackay31-Oct-05 22:44
Colin Angus Mackay31-Oct-05 22:44 
AnswerRe: What is in SQL Server 2005 Developer Edition Pin
Mike Dimmick1-Nov-05 1:50
Mike Dimmick1-Nov-05 1:50 
Questioncall store procedure using C++ code Pin
qdo999931-Oct-05 15:12
qdo999931-Oct-05 15:12 
Question1000 ADO problems... Pin
l3st4rd31-Oct-05 7:55
l3st4rd31-Oct-05 7:55 
Hi,

i need help in using ADO 2.5 objects with VB 6.0 (i know there're a lot newer version but i need to use this one...)
i'm not an expert in DB programming but i almost go crazy, maybe i'm just too stupid...

1st)
why does Recordset.RecordCount always return -1, even if it DOES contain several records?
i read somewhere that it's neccessary to first call Recordset.MoveLast and set Recordset.CursorLocation
to adUseClient, but this makes no difference at all


2nd)
<br />
    Dim uDB as Connection<br />
    Dim rs as Recordset<br />
<br />
    Set uDB = new Connection<br />
    Set rs = new Recordset<br />
<br />
    uDB.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source = " & db_directory<br />
    If uDB.state <> adStateOpen Then<br />
        MsgBox "Opening database failed."<br />
        Exit Sub<br />
    End If<br />
<br />
    For i = 0 to X<br />
       rs.Open "SELECT * FROM " & TableName & " WHERE ID = " & CStr(id), uDB, adOpenDynamic,   adLockOptimistic<br />
<br />
       'update some fields<br />
       rs.Update<br />
       rs.Close<br />
    Next i<br />


this works well for the first loop pass, but raises an "sql syntax error in select statement" up from the second pass. why?

3rd)
<br />
    On Error Goto ErrHandler<br />
    rs.Filter = "ID = " & CStr(id)<br />


immediately exits my sub without jumping to the error handler, but

<br />
    On Error Resume Next<br />
    rs.Filter = "ID = " & CStr(id)<br />

works fine and also selects the correct records. why ?

4th)
<br />
    rs.Open "SELECT * FROM " & TableName, uDB, adOpenDynamic, adLockBatchOptimistic<br />
    For i = 0 To X<br />
        rs.AddNew<br />
        'update new field<br />
        rs.Update  'also tried without calling Update...<br />
    Next i<br />
    rs.UpdateBatch<br />

shows now error but simply does nothing Frown | :( ... why?
(while opening the recordset with adLockOptimistic and only calling Update works fine)

5th) are there any restrictions in general on adding / altering data with recordsets that were
opened with a select statement?

6th)
<br />
    For i = 0 To X<br />
       'do something<br />
       sqlCmd = "UPDATE " & TableName & " SET field1 = '" & strField1 & "', field2 = '" & strField2 & "' WHERE ID = " & CStr(id) & " AND LANGUAGE_ID = " & CStr(langId)<br />
       uDB.Execute sqlCmd<br />
    Next i<br />

this works also fine in the first pass but returns a "sql syntax error in update statement" up from the second pass...!??

thx a lot for any answers.
daniel.
AnswerRe: 1000 ADO problems... Pin
jonathan151-Nov-05 23:35
jonathan151-Nov-05 23:35 
QuestionSending Http Post Request from Stored Procedure Pin
vineet1378031-Oct-05 7:24
vineet1378031-Oct-05 7:24 
QuestionHelp! our DBA died Pin
sameerhanda31-Oct-05 5:12
sameerhanda31-Oct-05 5:12 

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.