473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Programmatically creating ADO.NET database

I am an amateur programmer and trying to move from VB6 to VB.net.

I can't figure out how to create a ADO.NET database in code. I know how to
create a dataset and wonder whether there is a way to "export" it into a new
empty database.

Since I am at it: How do you programmatically store a query into an ADO
database?
I am using ADOX to create an ADO database.

Thanks for any help.

Peter Schoots
Dec 6 '05 #1
5 6483
Peter Schoots wrote:
I am an amateur programmer and trying to move from VB6 to VB.net.

I can't figure out how to create a ADO.NET database in code. I know how to
create a dataset and wonder whether there is a way to "export" it into a new
empty database.

Since I am at it: How do you programmatically store a query into an ADO
database?
I am using ADOX to create an ADO database.

Thanks for any help.

Peter Schoots


"How do you programmatically store a query into an ADO database?"

You want to create a stored procedure? or are you using MS Access to
store a query and recall it later? It would help to know the database
you are talking to.

Chris
Dec 6 '05 #2
Peter,

In addition to Chris, you need to know what database for that.

However we have some samples on our website for that.

http://www.vb-tips.com/default.aspx

Search or take the AdoNet part.

I hope this helps,

Cor
"Peter Schoots" <Pe**********@discussions.microsoft.com> schreef in bericht
news:92**********************************@microsof t.com...
I am an amateur programmer and trying to move from VB6 to VB.net.

I can't figure out how to create a ADO.NET database in code. I know how
to
create a dataset and wonder whether there is a way to "export" it into a
new
empty database.

Since I am at it: How do you programmatically store a query into an ADO
database?
I am using ADOX to create an ADO database.

Thanks for any help.

Peter Schoots

Dec 7 '05 #3
I am trying to create an Access database in code. In VB6 I used the
following code to create a ADO database.
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strFileName & ";" & _
"Jet OLEDB:Engine Type=5")

How is this done for ADO.net?

With respect of the Query question: I used for a DAO database the following
line to store a query.

newQdf = db.CreateQueryDef("StartingDate", strSql)

What is the equivalent for ADO? (I don't mean ADO.NET but the "old" ADO)

Peter Schoots

"Cor Ligthert [MVP]" wrote:
Peter,

In addition to Chris, you need to know what database for that.

However we have some samples on our website for that.

http://www.vb-tips.com/default.aspx

Search or take the AdoNet part.

I hope this helps,

Cor
"Peter Schoots" <Pe**********@discussions.microsoft.com> schreef in bericht
news:92**********************************@microsof t.com...
I am an amateur programmer and trying to move from VB6 to VB.net.

I can't figure out how to create a ADO.NET database in code. I know how
to
create a dataset and wonder whether there is a way to "export" it into a
new
empty database.

Since I am at it: How do you programmatically store a query into an ADO
database?
I am using ADOX to create an ADO database.

Thanks for any help.

Peter Schoots


Dec 7 '05 #4
Peter,

You cannot use ADONET to create an Access database.

However if it is there you can use it, did you see this sample.

http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8

I saw that you saw the link to ADO

ADO had in past some very famous football players.

I think that the most famous player was Ad Mansveld but he is not the only
one, however I can be wrong in that. It was a long time ago, in the time
there was also DOS which was number 4 and that kind of clubs.

Just after the introduction of proffesional footbal in holland and before
that.

However, I am not from theHague, I am and was never a real football fan.

Cor


"Peter Schoots" <Pe**********@discussions.microsoft.com> schreef in bericht
news:9E**********************************@microsof t.com...
I am trying to create an Access database in code. In VB6 I used the
following code to create a ADO database.
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strFileName & ";" & _
"Jet OLEDB:Engine Type=5")

How is this done for ADO.net?

With respect of the Query question: I used for a DAO database the
following
line to store a query.

newQdf = db.CreateQueryDef("StartingDate", strSql)

What is the equivalent for ADO? (I don't mean ADO.NET but the "old" ADO)

Peter Schoots

"Cor Ligthert [MVP]" wrote:
Peter,

In addition to Chris, you need to know what database for that.

However we have some samples on our website for that.

http://www.vb-tips.com/default.aspx

Search or take the AdoNet part.

I hope this helps,

Cor
"Peter Schoots" <Pe**********@discussions.microsoft.com> schreef in
bericht
news:92**********************************@microsof t.com...
>I am an amateur programmer and trying to move from VB6 to VB.net.
>
> I can't figure out how to create a ADO.NET database in code. I know
> how
> to
> create a dataset and wonder whether there is a way to "export" it into
> a
> new
> empty database.
>
> Since I am at it: How do you programmatically store a query into an ADO
> database?
> I am using ADOX to create an ADO database.
>
> Thanks for any help.
>
> Peter Schoots


Dec 7 '05 #5
On Wed, 7 Dec 2005 06:17:02 -0800, "Peter Schoots" <Pe**********@discussions.microsoft.com> wrote:

¤ I am trying to create an Access database in code. In VB6 I used the
¤ following code to create a ADO database.
¤ cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
¤ "Data Source=" & strFileName & ";" & _
¤ "Jet OLEDB:Engine Type=5")
¤
¤ How is this done for ADO.net?
¤

Same method. There is no native method in ADO.NET

http://support.microsoft.com/default...b;en-us;317867

¤ With respect of the Query question: I used for a DAO database the following
¤ line to store a query.
¤
¤ newQdf = db.CreateQueryDef("StartingDate", strSql)
¤
¤ What is the equivalent for ADO? (I don't mean ADO.NET but the "old" ADO)
¤

If you don't want to use DAO or ADOX (ADO) you can use Jet SQL:

http://msdn.microsoft.com/library/de...l/acadvsql.asp

For ADO you use ADOX (Microsoft ADO Ext. 2.x for DDL and Security):

http://msdn.microsoft.com/library/de...adocreateq.asp
Paul
~~~~
Microsoft MVP (Visual Basic)
Dec 7 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: ALthePal | last post by:
Hi, I'm not sure if we are able to or even how to loop through the web forms in a VB.NET project during design time. In MSAccess we are able to go through the database -> forms collection and...
6
by: Null Reference | last post by:
Anybody here who can explain or point me to a link ? I wish to create a blank MS Access DB file programmatically using C# . Thanks, nfs
3
by: R Reyes | last post by:
Just wondering if anyone knows the pros/cons between creating a database programmatically vs using the application's tool windows/features that come with SQLServer, Access, Oracle, etc... Is it...
3
by: Bradford | last post by:
I have an Windows application that displays lots of different colored lines in a Panel by using the Graphics.DrawLine method. The location and length of each line comes from a database query that...
1
by: Arpan | last post by:
The following ASPX code snippet creates a DataSet programmatically right from the scratch: 'create an empty DataSet Dim objDS As New DataSet("MyDataSet") 'create a new table & add columns Dim...
3
by: johnb41 | last post by:
Can anyone help me? I need to create a SQL Server Express 2005 database programmatically in my app. I have searched the web and I found nothing. Can anyone help? Are there classes in the new...
5
by: Brian McClellan | last post by:
Just wondering if anyone has a simple example of creating a gridview completely programmatically, i'm not doing anything terribly sophisticated. When creating the gridview declaratively evertying...
14
by: mistral | last post by:
Need php script to create mySQL database programmatically; since hosting configuration may not allow create database from script, script also need eliminate/rewrite all restrictions in appropriate...
11
by: =?Utf-8?B?UGV0ZXIgSw==?= | last post by:
I am working with Visual Studio or alternately with Expression Web. I need to create about 50 aspx pages with about 1200 thumbnali images, typically arranged in three to four groups per page,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.