
ODBC with SQL Server 6.5 in VB 4
Hi,
I'm now developing in VB 4.0 using ODBC to SQL Server 6.5.
I have successfully created a DataSource named 'dsVB4' and
use it in MS Query to read and update the tables with no
problem. But when I used the Connect string
'ODBC;DATABASE=ICIIS;UID=ICIISUser;PWD=iciisuser;DSN=dsVB4'
of a Data control (named as 'datCustInfo') and the 'ICIISUser.CustInfo'
as the RecordSource of the datCustInfo, and tried to use datCustInfo
as the DataSource and 'Name' as the DataField of a Text box, the
table can only be read. I used datCustInfo.RecordSet.AddNew to
try to insert a new record, but it failed.
The error is
Run-time error "3027".
Can't update. Database or object is read-only.
when I run the statement, but the error becomes
Run-time error "3426".
The action was cancelled by an associated object.
when I modify the Text box and run the statement.
Am I missing something??
Any kind of help would be appreciated. Thanks in advance.
--
___ _
| _ | / _` | ' \ Future Solutions Laboratory Limited (852)2319-2488
|_| |_|_\__,_|_||_| Rm 317, HKITC, Tat Chee Avenue, Kowloon, Hong Kong