I am migrating an access database to SQL Server. I have a front end appliction which uses ADO to access the access database. I use to add a new record to a table as shown.
rs.addnew
rs.fields("Field 1"
.value = "Field 1"
rs.fields("Field 2"
.value = "Field 2"
rs.fields("Field 3"
.value = "Field 3"
rs.update
This was fine when using access, now i have migrated to SQL Server when i try and add a record as above i get an error 'Line1: Incorrect syntax near 1'. I have discovered that this is because of the spaces in the field names, once the spaces are removed it works fine. I was just wondering if anyone new how i could get around this problem without removing the spaces from the fields in the database, as it means a lot more work.
Any help would be gratefully appreciated
Deleco
Deleco
rs.addnew
rs.fields("Field 1"
rs.fields("Field 2"
rs.fields("Field 3"
rs.update
This was fine when using access, now i have migrated to SQL Server when i try and add a record as above i get an error 'Line1: Incorrect syntax near 1'. I have discovered that this is because of the spaces in the field names, once the spaces are removed it works fine. I was just wondering if anyone new how i could get around this problem without removing the spaces from the fields in the database, as it means a lot more work.
Any help would be gratefully appreciated
Deleco
Deleco