I hope there is a simple answer to this simple query
basically i have a datacombo linked to a sql table usign the following
basic code:
Set CN = New ADODB.Connection
CN.CursorLocation = adUseClient
CN.Open ("Provider=MSDASQL.1;Password=KRAKEN;Persist Security
Info=True;User ID=sa;Data Source=eEnterprises6;Initial Catalog=RCC")
Set RS2 = New ADODB.Recordset
RS2.Open "SELECT ITEMNMBR FROM IV00102 WHERE LOCNCODE = '' ORDER BY
ITEMNMBR", CN, adOpenStatic, adLockOptimistic
Set DataCombo1.DataSource = RS2
Set DataCombo1.RowSource = RS2
DataCombo1.DataField = "ITEMNMBR"
DataCombo1.ListField = "ITEMNMBR"
i can use the datacombo as i want, until i added movenext and
moveprevious cmd buttons
if i have used the datacombo to navigate to a record
then use the cmd button with the code
RS2.movenext
i get the follwoing message:
Run-time error '-2147217900(80040e14)':
[micrsoft][ODBC SQL Driver][SQL server]Violation of PRIMARY KEY
constraint 'PKIV00102'. Cannot insert duplicate key in object 'IV00102'.
i do not understand why i am gettign it as i am not updating or adding
records in any way
it will movenext or previous fine if i havent used the datacombo drop
down first?
can anyone clear this up for me?
ReN DOH!!!!
*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!