Click here to Skip to main content
16,010,553 members
Home / Discussions / Database
   

Database

 
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 
AnswerRe: 1000 ADO problems... Pin
jonathan151-Nov-05 23:35
jonathan151-Nov-05 23:35 
I cant answer all your questions but i can give you a few ideas.

1. Yes this is correct. ADO recordcount is not like it was in the older DAO. It basically returns the recordcount to the current cursor location so yes you need to call recordset.movelast before you can get a count. It should work for you like this.

Just as a side issue which may help i prefer to set all the recordset properties before opening the recordset. Its more readable eg

set rs = new recordset
rs.cursorlocation = adUseCLient
rs.cursortype = adOpenDynamic
rs.locktype = adLockOptimistic
rs.open sql,connection

2 & 6. try to look at it logically. Define a string variable to hold the SQL eg
dim sSQL as string
sSQL = "SELECT * FROM " & TableName & " WHERE ID = " & CStr(id)
rs.open ssql,connection

you can then set a breakpoint and see what the sql actually contains. Also i would probably set the recordset to a new recordset then set it to nothing within the loop since you are actually creating a new recordset.

3. Do you have any code in the errorhandler to report the Error? What is the error? It could be more of a structure problem if it works without the error handling.

4. OK. You seem to be a bit confused about the use of batch uptates etc.
I am pretty sure you need a client side cursor to use the batch updates. If you use updatebatch you need to use adlockbatchoptimistic as the lock type. I suggest you find some examples on the web but in general the flow should be.

set rs = new recordset
rs.cursorlocation = adUseCLient
rs.cursortype = adOpenDynamic
rs.locktype = adLockBatchOptimistic
rs.open sql,connection

for i = 0 to 9
rs.add
rs.fields(0) = Value
rs.fields(1) = value
next

rs.marshaloptions = admarshallall ' or admarshallmodifiedonly
rs.updatebatch

5. None specific to using SQL unless you have joins

Its been a while since i used ADO but i hope i have given you some ideas.

Jon
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 
AnswerRe: Help! our DBA died Pin
Mike Dimmick1-Nov-05 1:59
Mike Dimmick1-Nov-05 1:59 

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.