471,594 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

dataform wizard in visual studio 2003 and sql server 2000 database

I am trying out the dataform wizard in visual studio using a sql server
2003 database.
It seems to want to create ole db adapters and connections and
commands.
How do I make it use sql commands adapters and connections?
This wizard could save time, however would prefer it used sqlconnection
command and adapter.

thanks in advance,
sincerely

Ralph

Nov 20 '06 #1
4 1870
Hi Ralph,

Make sure the data connection is using the proper connection type.

In server explorer, modify connection and in the Provider tab, make sure
"Microsoft OLE DB Provider for SQL Server" is selected.
On Mon, 20 Nov 2006 12:55:50 +0100, Ralph <ra******@gmail.comwrote:
I am trying out the dataform wizard in visual studio using a sql server
2003 database.
It seems to want to create ole db adapters and connections and
commands.
How do I make it use sql commands adapters and connections?
This wizard could save time, however would prefer it used sqlconnection
command and adapter.

thanks in advance,
sincerely

Ralph


--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 20 '06 #2
Hi Morten,
Thanks for your prompt response.
Unfortunately I suspect I hit some kind of bug in the 2003 IDE.
Seems as though if I drop and drag onto a form from the server explorer
it does indeed produce sqlconnection and sql dataadapters,
however if I use the dataform wizard it wants to create the oledb
connections and oledbadapters.
Again thanks Morten.

Ralph

Morten Wennevik wrote:
Hi Ralph,

Make sure the data connection is using the proper connection type.

In server explorer, modify connection and in the Provider tab, make sure
"Microsoft OLE DB Provider for SQL Server" is selected.
On Mon, 20 Nov 2006 12:55:50 +0100, Ralph <ra******@gmail.comwrote:
I am trying out the dataform wizard in visual studio using a sql server
2003 database.
It seems to want to create ole db adapters and connections and
commands.
How do I make it use sql commands adapters and connections?
This wizard could save time, however would prefer it used sqlconnection
command and adapter.

thanks in advance,
sincerely

Ralph

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 20 '06 #3
Ah, Sorry,

Never tried the DataForm wizard, but I couldn't find any way to specify
sql types over oledb. However, you can easily change from OleDb to Sql
with a search and replace the following

Important! Open the designer generated code region before you do a search
and replace or you won't find all items.

System.Data.OleDb.OleDbType =System.Data.SqlDbTypes
System.Data.OleDb.OleDb =System.Data.SqlClient.Sql
oleDb =sql

Then you need to change a few data types as oledbtypes and SqlDbTypes are
differently named.

Alternately, Create a dataset before you start the wizard and use this
dataset instead of a new dataset when running the wizard.
On Mon, 20 Nov 2006 14:12:53 +0100, Ralph <ra******@gmail.comwrote:
Hi Morten,
Thanks for your prompt response.
Unfortunately I suspect I hit some kind of bug in the 2003 IDE.
Seems as though if I drop and drag onto a form from the server explorer
it does indeed produce sqlconnection and sql dataadapters,
however if I use the dataform wizard it wants to create the oledb
connections and oledbadapters.
Again thanks Morten.

Ralph

Morten Wennevik wrote:
>Hi Ralph,

Make sure the data connection is using the proper connection type.

In server explorer, modify connection and in the Provider tab, make sure
"Microsoft OLE DB Provider for SQL Server" is selected.
On Mon, 20 Nov 2006 12:55:50 +0100, Ralph <ra******@gmail.comwrote:
I am trying out the dataform wizard in visual studio using a sql
server
2003 database.
It seems to want to create ole db adapters and connections and
commands.
How do I make it use sql commands adapters and connections?
This wizard could save time, however would prefer it used
sqlconnection
command and adapter.

thanks in advance,
sincerely

Ralph

--
Happy Coding!
Morten Wennevik [C# MVP]


--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 21 '06 #4
I've never used any of the drop functionality. I am used to coding it
all manually.
However if what gets produced is close to what I am looking for and
saves time I believe I should give it a try.
I noticed that if I just create a dataadapter it autmatically does that
using the SQL Client.
However for some reason the dataform wizard uses oledb.
With the difference in how the two deal with parameters there is a
little more to do than just search and replaces.

Creating the dataset before.
I will have to give that a try.
I wonder if the xsd file cotains info to specify which database it was
created from?
Morten Wennevik wrote:
Ah, Sorry,

Never tried the DataForm wizard, but I couldn't find any way to specify
sql types over oledb. However, you can easily change from OleDb to Sql
with a search and replace the following

Important! Open the designer generated code region before you do a search
and replace or you won't find all items.

System.Data.OleDb.OleDbType =System.Data.SqlDbTypes
System.Data.OleDb.OleDb =System.Data.SqlClient.Sql
oleDb =sql

Then you need to change a few data types as oledbtypes and SqlDbTypes are
differently named.

Alternately, Create a dataset before you start the wizard and use this
dataset instead of a new dataset when running the wizard.
On Mon, 20 Nov 2006 14:12:53 +0100, Ralph <ra******@gmail.comwrote:
Hi Morten,
Thanks for your prompt response.
Unfortunately I suspect I hit some kind of bug in the 2003 IDE.
Seems as though if I drop and drag onto a form from the server explorer
it does indeed produce sqlconnection and sql dataadapters,
however if I use the dataform wizard it wants to create the oledb
connections and oledbadapters.
Again thanks Morten.

Ralph

Morten Wennevik wrote:
Hi Ralph,

Make sure the data connection is using the proper connection type.

In server explorer, modify connection and in the Provider tab, make sure
"Microsoft OLE DB Provider for SQL Server" is selected.
On Mon, 20 Nov 2006 12:55:50 +0100, Ralph <ra******@gmail.comwrote:

I am trying out the dataform wizard in visual studio using a sql
server
2003 database.
It seems to want to create ole db adapters and connections and
commands.
How do I make it use sql commands adapters and connections?
This wizard could save time, however would prefer it used
sqlconnection
command and adapter.

thanks in advance,
sincerely

Ralph


--
Happy Coding!
Morten Wennevik [C# MVP]

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 21 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Chesne | last post: by
3 posts views Thread by Hansen | last post: by
reply views Thread by Meenu4vs | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.