=?Utf-8?Q?Unrecognized_database_format_=E2=80=98C:?= =?Utf-8?Q?\Trading_System=E2=80=99?=

=?Utf-8?Q?Unrecognized_database_format_=E2=80=98C:?= =?Utf-8?Q?\Trading_System=E2=80=99?=

Post by cnlndXk3Mj » Sun, 20 Dec 2009 07:02:01

Unrecognized database format :\Trading System
I working in 2007 (finally took the leaf of faith). Why would I get the
error described above? My code is below:

Private Sub Post_Click()
Dim err As Integer
Dim cnn1 As ADODB.Connection
Dim rstcontact As ADODB.Recordset
Dim strCnn As String

'if no errors insert data
If err<< 1 Then
' Open a connection.
Set cnn1 = New ADODB.Connection
mydb = "C:\Trading System.accdb"
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mydb
cnn1.Open strCnn

' Open contact table.
Set rstcontact = New ADODB.Recordset
rstcontact.CursorType = adOpenKeyset
rstcontact.LockType = adLockOptimistic
rstcontact.Open "Options", cnn1, , , adCmdTable

'get the new record data
rstcontact!OptionNo = OptionNo
rstcontact!TicketNo = TicketNo
rstcontact!Side = Side
rstcontact!Symbol = Symbol
rstcontact!Quantity = Quantity
'rstcontact!Month = Month

rstcontact!Strike = Strike
rstcontact!Call_Put = Call_Put
rstcontact!Price = Price
rstcontact!Exchange = Exchange
rstcontact!Approved = Approved

rstcontact!DateAdd = Now()


' Show the newly added data.
MsgBox "New Post: " & rstcontact!OptionNo & " " &
rstcontact!TicketNo & " has been successfully added"

'close connections

MsgBox "An Error has occurred, please check and try again"
End If

End Sub

I think the problem is coming from here:
mydb = "C:\Trading System.accdb"

I am referencing Microsoft ActiveX Data Objects 2.8 Library
I tried to reference Microsoft DAO 3.6 Object Library because this is what I
had when I used this code in Access 2002. This must be a simple fix, right.
One of the references is not correct?

Also, I now have this saved on my C-drive. How can I make sure the Form
will write to the Table no matter where the database is saved? I giving
this file to a friend when I am done with it. I think he is going to put it
on his corp. network (intranet). Is there some way to set this up so the
database doesn have to be saved to a specific place? I know a few people
in his office will use it. I know he will not save the file on hid cC-drive,
like I did. Any thoughts on this?

Thanks so much!

If this information was helpful, please indicate this by clicking ''Yes''.

1. =?Utf-8?Q?Command_Button=E2=80=99s_=E2=80=98back_color=E2=80=99?=

2. =?Utf-8?Q?How_to_optimize_LIKE_=E2=80=99%MySearchS?= =?Utf-8?Q?tring=E2=80=99?=


I using a statement with LIKE in the WHERE clause. Searching for rows
containing a prefix (LIKE yPrefix% SQL Server seeks the index on that
column that fine. But if I want to search for a suffix (LIKE MySuffix
an Index Scan is used and takes very long. Do I have any possibility that SQL
Server does an Index Seek in case of LIKE MySuffix

How can I optimize such a query?

I also couldn find a use of FTS in this case, because CONTAINS only
provi<es a but not a term for suffixes or am I wrong?

Thank you all!

3. =?Utf-8?Q?_How_to_optimize_LIKE_=E2=80=99%MySea?= =?Utf-8?Q?rchString=E2=80=99?=

4. =?Utf-8?Q?_Urgent_help_Runtime_error_=E2=80=981?= =?Utf-8?Q?004=E2=80=99_Method_=E2=80=98SaveAs=E2=80=99_of_object=E2=80=99-?= =?Utf-8?Q?Wo?=

5. =?Utf-8?Q?_Urgent_help_Runtime_error_=E2=80=981?= =?Utf-8?Q?004=E2=80=99_Method_=E2=80=98SaveAs=E2=80=99_of_object=E2=80=99-?= =?Utf-8?Q?Workbo?=

6. =?Utf-8?Q?_If_A56_is_=E2=80=9CYes=E2=80=99=2C_hide_Column?= =?Utf-8?Q?_A58:A60.?=

7. =?Utf-8?Q?Windows_=E2=80=9CScheduled_Task_Wizard=E2=80=A6.?= =?Utf-8?Q?.=E2=80=9D?=

8. =?Utf-8?Q?_Error_Message:__=E2=80=98Argument_No?= =?Utf-8?Q?t_optional=E2=80=99?=

9. =?utf-8?Q?_Ballmer:_=E2=80=98Windows_7_will_be_?= =?utf-8?Q?Vista=2C_but_a_lot_better=E2=80=99?=

10. =?Utf-8?Q?=22The_data_file_=E2=80=98Personal_Folder=E2=80=99?= =?Utf-8?Q?_was_not_closed_properly.=22?=

11. =?Utf-8?Q?Connection_failed:_SQLState:_=E2=80=98S1?= =?Utf-8?Q?T00=E2=80=99?=

12. =?Utf-8?Q?IMediaControl::Run_fails_when_us?= =?Utf-8?Q?ing_=E2=80=98WM_ASF_Writer=E2=80=99?=

13. =?Utf-8?Q?Addon:_IMediaControl::Run_fails_?= =?Utf-8?Q?when_using_=E2=80=98WM_ASF_Writer=E2=80=99?=

14. =?Utf-8?Q?Error_Message:__=E2=80=98Argument_Not_op?= =?Utf-8?Q?tional=E2=80=99?=

15. =?Utf-8?Q?Outlook_won't_open_web_pages=2C_=E2=80=98i?= =?Utf-8?Q?nsufficient_rights=E2=80=99?=