anyone trying out the beta? I have a few questions

J

Jason Shohet

I'm using the new SqlDataSource successfully. Just for reference, here's my
code:

asp:SqlDataSource ID="ds" Runat="server" SelectCommand="SELECT
employee_ssno, firstname, lastname FROM employee_temp order by lastname"
ConnectionString="<%$ ConnectionStrings:AppConnectionString1 %>"
ProviderName="System.Data.OleDb" UpdateCommand="UPDATE DBOWEB.EMPLOYEE_TEMP
SET firstname=?, lastname=? WHERE employee_ssno=?"> </asp:SqlDataSource>

Q1: That 1 updatecommand above takes care of the select, the update, the
delete... everything it seems. Anyhow, I can't figure out how to specify
that the firstname & lastname fields above be lowercase. Its not like its a
regular Oracle query where i can use the Lower function in the select
statement. This is a parameterized query using OLEDB. Any ideas how to
get a field to display lower case?

Q2: dumb question. I'd like web services to handle a lot of the querying,
that way they can be used across multiple applications etc. I assume that
you can NOT use sqlDataSource in a web service? We've tried it, but can't
get it to work. In asp.net 1.0 we have a web service return a dataset and
have a datagrid use that dataset as its source. In asp.net 2.0, whats the
way to go in regards to passing a result set back from a web service, and
having the gridview consume it? I'm not sure what to do.

Q3: the dumbest question. Is the .net 2.0 framework available so I can put
it on our test deployment server? I mean, I'm ready to go live with an
application and I'm not sure where to get the framework to put on the
windows2003 server. Right now it only has 1.1, which comes w/ 2003.

TY! Jason Shohet
 
N

Nicholas Paldino [.NET/C# MVP]

Jason,

Why not? Why can't you do this:

<asp:SqlDataSource ID="ds" Runat="server" SelectCommand="SELECT
employee_ssno, lower(firstname) as firstname, lower(lastname) as
lastname
FROM employee_temp order by lastname"
ConnectionString="<%$ ConnectionStrings:AppConnectionString1 %>"
ProviderName="System.Data.OleDb" UpdateCommand="UPDATE
DBOWEB.EMPLOYEE_TEMP
SET firstname=lower(?), lastname=lower(?) WHERE employee_ssno=?">
</asp:SqlDataSource>

If the back end is SQL server (or a language that supports it), then it
should be just fine. You might have to specify an insert and a delete
statement as well so the SqlDataSource doesn't guess at what those commands
should be (and would probably be thrown off because of the call to lower as
well). The provider for OLEDB is just going to do substitution, not change
the syntax of your query.

As for #2, you can do it using the SqlDataSource. Just create a new
instance, and set the appropriate properties. You might find it easier to
just use the classes in the System.Data namespace though. The reason for
the SqlDataSource in .NET is so that you can declare your data source in the
markup for ASP.NET.

.NET 2.0 is in beta right now, so you are assuming a degree of risk in
placing it into production on an application server. You have to decide if
it works for you. If you have a MSDN universal subscription, then you
should have access to the betas, otherwise, I'm not sure how you can get a
hold of them.

Hope this helps.
 
W

Willy Denoyette [MVP]

Please use microsoft.private.whidbey newsgroups you to post v2.0 Beta
questions.
Your question relates to both - microsoft.private.whidbey.aspnet.general and
microsoft.private.whidbey.adodotnet.

Willy.
 
J

Jason Shohet

Willy maybe you could help me access that ng. I tried to add a server
called 'microsoft.private.whidbey' but no such server exists.... Right now
the server I'm accessing is msnews.microsoft.com

TY
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top