![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Microsoft office error all errors related to Microsoft office error |
![]() |
|
Access front-end & SQL back-end / moving from MDB to ADP
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
1) I have a form that on the Load event it would do something like this: Me.Recordsource = "Select ID, Name, Etc from tblSample" I am not able o add records if I use this method. 2) I am not able to pass variables to SQL strings to fill textboxes like: list1.recordsource = "Select WorkDays from tblSample2 Where ((Workdays > [txtBeginDate]))" I get an error saying that [txtBeginDate] is not a column. 3) I had a function to calculate WorkDays that used "Weekday" in its coding. Now I get an error saying that "Weekday" is not a bult-in function. Thanks in advance for your help. |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
Just mention only the issues you've found so far (there *will* be other's if you're committed to this process)... 1) If it's a straight forward Select statement you should still be able to assign the source thusly. The upsizing process itself may have left your tables in a state where they're not appendable. Can you open the table directly through the Access database window and add records there? You need to be sure the table has a Primary key (still) and that default values are specified for fields (especially any bit fields). 2) Nope - you can't pass parameters as you'd have once had. The local textbox is meaningless to SQL Server. You'll have to assign it as list1.recordsource = "Select WorkDays from tblSample2 Where ((Workdays > '" & Me.[txtBeginDate] & "'))" 3) Indeed - Jet's functions (and the functions it shares with VBA) are also without meaning in T-SQL. (T-SQL is SQL Server's SQL language - and in an ADP everything needs to be in that dialect). You'll need to abide by functions that are supported on the server. You could try the DAY function instead as a quick attempt. In an ADP there is no local database engine anymore (Jet isn't there to help you). Everything is executed on the server. If you use an MDB with linked tables the process is perhaps more gentle (though *very* likely not as efficient). But you could perhaps work up to a fully OLEDB solution then. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|