Friday, March 30, 2012
Help if possible
I'm not sure if I explained this the best, but any help would be greatly appreciated.select t1.itemnumber
, t1.ticketnumber
from yourtable as t1
inner
join yourtable as t2
on t1.ticketnumber
= t2.ticketnumber
and t1.itemnumber
<> t2.itemnumber|||I tried that code and it didn't work right, but maybe it's because I forgot to explain something in full detail. I'm looking to display the ticket number in which an itemnum 8999 was sold, but another itemnum was sold on that same ticket.|||select t2.itemnumber
, t1.ticketnumber
from yourtable as t1
inner
join yourtable as t2
on t1.ticketnumber
= t2.ticketnumber
and t1.itemnumber
<> t2.itemnumber
where t1.itemnumber = 8999sql
Monday, March 19, 2012
Help about SQL server
Hi ,I am new learner to SQL server. We can either add the sqldatasource by add item option or use the external sql server.Can anybody tell me is it possible to use both of these ?if yes then what about the connection string? how can we connect to the database by connection string in web.config or which is generated through the sqldatasource?
Please help me......Your help is greatful to me.
Hi
SQLDatasource is typically accessed from the tools menu and when it is drag and dropped to the design view, it starts a wizard that would first prompt you to connect to a local or remot server. After giving necessary credintials it would connect to the SQLServer and then prompt you to provide a connection string. this connection string is what will get added under the <connectionString> section in the web.config file. SQL Data source further on uses this connection string to connection to perform CRUD operations using the controls like grid view etc.
Having said that once the connectionString is stored in web,.config file (notice that it has complete details of the name of the SQL server, and other parameters), you can programatically retrive the connection string using the syntax
ConfigurationManager.ConnectionStrings["NW"].ConnectionString;
Note in the above "NW" is the name attribute of the connection string. This is the name for the connection string that you would have provided when you had originally used SQLDataSource to create the connection. You can use the name inside the web.config file also.
Hope the helps
VJ