Re: Saving Back-End Data As mdf



I believe I'll stick with Access 2003 for now. This would require
a learning vb a bit more and this is what I was trying to avoid at my age.
Although at this time I'm unable to reinstall the Office 2007 Beta
the short time I worked with Access 2007 I found several features
that I like: The automatic date picker for date fields, the ability to
have a memo field in rich text and split forms seem intriguing.

Thanks much,
James

"Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OjtV%23GNvGHA.3428@xxxxxxxxxxxxxxxxxxxxxxx

That's not a function that you would call from anywhere, James. That is
the complete code of a VB.NET console app. You could run it from inside
Visual Studio by pressing the F5 key or choosing Start from the Debug
menu. Having build and compiled the app, you could run it outside Visual
Studio by typing the name of the executable at a command prompt. Of
course, I'm not suggesting that the UI for your next data-centric app
should be a DOS prompt! It's just an example to illustrate how a
connection string is used. Console apps are useful for demonstrating
things like that, as they can be created very quickly and consist entirely
of code that can be copied and pasted as plain text. A Windows or Web app
that did the same thing would take too long to develop for a quick example
like this, and it would not be practical to post it in a newsgroup.

--
Brendan Reynolds
Access MVP

"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:eKuUBlMvGHA.4968@xxxxxxxxxxxxxxxxxxxxxxx
And this function should be called from where?

James

"Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%234i6HmGvGHA.4688@xxxxxxxxxxxxxxxxxxxxxxx

I posted an example of a connection string earlier. Here's an example of
a VB.NET console app that uses that connection string. This assumes that
your database is an MDB, not the new ACCDB format. There's an example of
a connection string for the new ACCDB format in my earlier post, but as
I said I believe that would require Office 2007 installed on the target
PC and probably will not work now that you have uninstalled Office 2007.

Module Module1

Sub Main()

Dim ConnectionString As String
Dim Connection As System.Data.OleDb.OleDbConnection
Dim Command As System.Data.OleDb.OleDbCommand
Dim Reader As System.Data.OleDb.OleDbDataReader

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\usenet\source.mdb;" & _
"Persist Security Info=False"
Connection = New
System.Data.OleDb.OleDbConnection(ConnectionString)
Command = Connection.CreateCommand
Command.CommandText = "SELECT CategoryName FROM Categories " & _
"ORDER BY CategoryName"
Command.CommandType = CommandType.Text
Try
Connection.Open()
Reader = Command.ExecuteReader
Do While Reader.Read
Console.WriteLine(Reader(0).ToString)
Loop
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
If Not Reader Is Nothing Then
If Not Reader.IsClosed Then
Reader.Close()
End If
End If
If Not Connection Is Nothing Then
If Connection.State <> ConnectionState.Closed Then
Connection.Close()
End If
End If
Console.ReadLine()
End Try

End Sub

End Module

--
Brendan Reynolds
Access MVP

"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:eHXfKYGvGHA.4472@xxxxxxxxxxxxxxxxxxxxxxx
This is the what occurs when I try to make a new data connection.
I'm not quite sure what to use as the connection string.

'Format of the initialization string does not conform to
specification starting at 0.'

James

"Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:utuhVhFvGHA.4436@xxxxxxxxxxxxxxxxxxxxxxx

Yes, it was the error you were getting when trying to connect from the
VB.NET app to the MDB that I was talking about! :-)

I'm sorry, I'm afraid I don't have any suggestions about the Office
installation problem. There's probably a setup log created somewhere
on your PC that might give some indication of what the problem is, if
you can decipher it. But I've been lucky, I haven't had any
installation problems with Office 2007, so I haven't needed to look
into that.

I've probably jinxed myself now, of course. Excuse me while I go find
a piece of wood to knock on! :-)

--
Brendan Reynolds
Access MVP


"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:OPV13AAvGHA.4888@xxxxxxxxxxxxxxxxxxxxxxx
Sorry wrong thread.

"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:OJlEI6$uGHA.5056@xxxxxxxxxxxxxxxxxxxxxxx
Here's the error. This occurs after I make the selections in the
Custom install for Access 2007 and the Shared Office stuff
at the bottom. The rest I set to Not Available. Mind you, I have
tried to use just the Upgrade option and have tried installing all
so it doesn't appear to be a problem with how or what I install.

Error: 'Microsoft Office Professional Plus 2007 (Beta) setup did not
complete successfully. We are sorry
for the inconvenience.'

'An error occurred during installation and Microsoft Office
Professional Plus 2007 (Beta) setup was
unable to complete.'

Thanks,
James

"Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:%23Trz2K5uGHA.2448@xxxxxxxxxxxxxxxxxxxxxxx
It's up to you, of course, if you don't want to pursue this
further, but possibly someone might be able to help if you can tell
us what the error message was. (I gather you may have done that in
another thread, but I haven't seen it.)

--
Brendan Reynolds
Access MVP

"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:eO8upuzuGHA.1852@xxxxxxxxxxxxxxxxxxxxxxx
Same error message. Of course the Data Source is the path to the
mdb.
I don't know.
I'll give up for now.

James

"Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:%23peV9etuGHA.976@xxxxxxxxxxxxxxxxxxxxxxx

My understanding is that if you use the new file format you will
need to use the new provider, with a connection string something
like so ...

Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=c:\usenet\test.accdb;Persist Security Info=False

... however, because this new provider is a component of Office
2007, and not a component of the operating system as the older
JET provider is, this requires Office 2007 to be installed on the
target PC, which is presumably why it won't work on your PC now
that Office 2007 has been uninstalled.

If you stick with the older MDB format, you should be able to get
to it from .NET with the older JET provider, using a connection
string something like ...

Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\usenet\test.mdb;Persist Security Info=False

At the following URL ...

http://www.microsoft.com/office/preview/beta/getthebeta.mspx?showIntro=n

... under the heading 'IT Content for 2007 Office System Beta 2'
there is a reference to 'an authorization control that provides
you access to the Microsoft Office Online Beta site'. I can't say
for sure, but I would expect that access to the Beta site would
probably include access to the Beta newsgroups, and possibly you
might get more help with your installation issue there.

Good luck,

--
Brendan Reynolds
Access MVP

"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:O92Xt%23suGHA.4460@xxxxxxxxxxxxxxxxxxxxxxx
Ok. Just trying different things.

Thanks
James

"Arvin Meyer [MVP]" <a@xxxxx> wrote in message
news:OILGKBpuGHA.4612@xxxxxxxxxxxxxxxxxxxxxxx
Yes it is beta software, and not really ready for production
databases. Not too many are using it at all, and those of us on
the beta, are not using it in production. It should therefore
be understandable that we can't (or don't) answer questions on
Access 2007.

Try a stable release, such as XP (2002) or 2003, and you will
be able to do what you need to do. I also suggest that you keep
the databases in the default Access 2000 file format. That way
you will be able to share it with a wider range of users.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:ucUNe9luGHA.5084@xxxxxxxxxxxxxxxxxxxxxxx
Why? Ready? Here goes.
It all started when I attempted to evaluate Access 2007 Beta.
I needed to uninstall the Office 2007 Beta 2 times. The third
time I tried to install it the install failed. So I'm
unable to evaluate Access 2007 Beta. I've posted and posted to
these newsgroups and no one has replied.
I understand it's a beta but if I can't install it I can't
evaluate it.
So, I decided to try Visual Basic 2005 Express Edition. Now a
problem with that. I get an error when I try to
connect to my Access back-end db. Again, I posted and
posted...
nothing.
I was hoping I would have better luck if I would save the mdb
as a mdf file for Visual Basic 2005 Express Edition.
Any way I'm a bit frustrated now.
It's sort of funny I was able to connect to my Access
back-end db with Alpha 5!? Maybe I'll go with that.

James

"Arvin Meyer [MVP]" <a@xxxxx> wrote in message
news:OIBWNnbuGHA.5044@xxxxxxxxxxxxxxxxxxxxxxx
mdf files are the SQL-Server data files. You need to have an
instance of SQL-Server running in order to save anything to
the file. Once you do it is easy. Access forms can connect
directly to the data tables in SQL-Server. My question to you
might be, why use VB.NET if you alrady have a more efficient
database application front-end in Access?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

"JamesJ" <jjy@xxxxxxxxxxxxxxxxxxx> wrote in message
news:uKF04hYuGHA.1852@xxxxxxxxxxxxxxxxxxxxxxx
Ho do I save or export my back-end data db as
a mdf so I might use it in Vb 2005.

Thanks,
James































.



Relevant Pages

  • Re: Saving Back-End Data As mdf
    ... complete code of a VB.NET console app. ... It's just an example to illustrate how a connection string is used. ... so it doesn't appear to be a problem with how or what I install. ... you access to the Microsoft Office Online Beta site'. ...
    (microsoft.public.access.formscoding)
  • Re: Saving Back-End Data As mdf
    ... I'm not quite sure what to use as the connection string. ... so it doesn't appear to be a problem with how or what I install. ... My understanding is that if you use the new file format you will need ... access to the Microsoft Office Online Beta site'. ...
    (microsoft.public.access.formscoding)
  • Re: Saving Back-End Data As mdf
    ... VB.NET console app that uses that connection string. ... database is an MDB, ... so it doesn't appear to be a problem with how or what I install. ... access to the Microsoft Office Online Beta site'. ...
    (microsoft.public.access.formscoding)
  • Re: Saving Back-End Data As mdf
    ... VB.NET console app that uses that connection string. ... connection string for the new ACCDB format in my earlier post, ... so it doesn't appear to be a problem with how or what I install. ... access to the Microsoft Office Online Beta site'. ...
    (microsoft.public.access.formscoding)
  • Re: Commercial release Newbie
    ... The app is working with five other 'Beta' users ... and all, including the newest tester, used the same install. ... > code to check if the document is protected before trying to unprotect it. ...
    (microsoft.public.access.externaldata)