|
I define a default value for my filed in SQL server.
but when i drag and drop thats table on my form, and then generate DataSet from its DataAdapter, its DataSet have not Default Value.
I can define a default value for it in xml schema, but i want do it automatically .
please help . thanks.
|
|
|
|
|
I'm pretty sure you can define default values using table styles.
|
|
|
|
|
i want to define default value in sql server table , without redefining it in dataset.
|
|
|
|
|
I want to change a RowState property of a DataRow from a DataTable manually.
in example , i want to change from "Unchanged" state to "Added" state.
thanks.
|
|
|
|
|
How can I print reports from the .Net Reporting Services?
Can I have a "Print" button there to click on the web form to print out the reports?
|
|
|
|
|
hi,
Please check the reporting articles which is there in codeproject.com. I seen lot of reporting related here in codeproject.com.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Yes I have checked those articles but then none mentioned bout printing those reports from .Net Reporting Services.
|
|
|
|
|
VistaDB 2.0 (RC3) data engine for .NET is now available for download.
VistaDB is the #1 alternative to Jet/Access, MSDE, Xbase and sometimes
SQL Server, for building small to midsize .NET database applications.
Includes embeddable 1MB engine, managed ADO.NET Provider and VCL components.
Special $129 intro offer expires Sept. 24th (Save $200).
Download Eval: http://www.vistadb.net/evalrequest.asp [^]
(1st post went in the wrong board -- please no extra flames)
Anthony Carrabino
www.vistadb.net
|
|
|
|
|
vistasoftware wrote:
(1st post went in the wrong board -- please no extra flames)
Yeah, some of those lounge regulars are pretty trigger happy with the flamethrower. I have to say you did a good job of correcting it though. Deserves recognition in my book!
Matt Newman
...armed with what? spitballs!? - Zell Miller
|
|
|
|
|
Thanks Matt. That was like having a pit in my stomach
seeing that one lady post those nasty msgs. I don't
blame her because so many people have abused the system
so now we're all hyper-sensitive with advertisements.
The funny thing is we all need each other -- developers
need tools, tool vendors need customers and online forums
need vendors to pay for advertisement.
Sometimes feathers get ruffled
It's ok. It won't happen again.
Anthony Carrabino
www.vistadb.net
|
|
|
|
|
vistasoftware wrote:
That was like having a pit in my stomach
seeing that one lady post those nasty msgs
If you stay a while you'll get used to lauren's... ummm.. "style". Just don't mention Sony laptops.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
|
Does anybody know of a good way of converting a OLE DB property set into a connection string?
[edit]I found a nice VB-centric interface called IDataSourceLocator which gives me the connection string "automagically". However, I'm still curious to know how to convert any IDBProperties -> connection string. The docs refers to ADO connection strings when describing this VB-centric interface. I don't know what implications that may have on the resulting connection string. I use raw OLEDB under the hood, and not ADO, and I really don't want to end up with connection strings which may not work.[/edit]
[solution]Just create a MSDAINITIALIZE object, query for IDataInitialize, and use GetInitializationString on your IDBProperties object. The docs says that GetInitializationString converts a data source object to a connection string. It didn't strike me that the IDBProperties interface handle I had was in fact a data source object until now. [/solution]
--
Arigato gozaimashita!
|
|
|
|
|
I am storing some user IDs & passwords in a table in SQL server. Users will login into various database related applications & they can update the data there. Also, they can change their respective passwords also. But anybody can goto EXCEL and from Data (Menu) -> Import External Data -> and New Database query, and get all the information into the excel sheet.
Is there any method to stop this?
|
|
|
|
|
There are good security practises that you can use to make sure that sensitive data (passwords, credit card numbers) etc are either encrypted or hashed in the database, so that a query cannot be used to view the data.
See this article for an example of this technique.
my blog
|
|
|
|
|
Dear Sir, Thank you very much for the answer and also a very good & useful article.
Though I am happy with the suggested method, I would also like to know whether "Is there any way to stop this Importing Data in to EXCEL"
Thanking You
|
|
|
|
|
Yes. Make the users log in to SQL Server using an unprivileged login - e.g. one that is a member of the public role but not a member of dbo . This is a best practice in any case. Do your password checking in a stored procedure. Grant EXEC permission for public to the stored procedure, and deny SELECT permission to the table containing the usernames and passwords.
Don't ever give out your sa password. Make it a strong one.
SQL Server's security features are pretty powerful but you have to use them. Far too many applications use sa to connect to the database. Applications and users should always be limited to only seeing the data and performing the operations you specify.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi all,
I need to be able to do a query for those values that are not in a particular field in a recordset.
So lets say I have a table with a field (indexnum) which is a text string of a hex number. eg "00034F12". That number is incremented for each record that is added. Legacy code, so I don't know why it is done this way.
What i need to do is query for all indexnum's that don't occur given a list of indexnums. Indexnums will be between 00000001 and 0x000FFFFF. These are not hardcoded, so at the time this code will be run, it maybe between 0034829F and 00349000. So some how I need something like :
SELECT indexnum from tblData NOT IN ( SELECT ... [build up a temp table or something or a sequence of number from the starting and ending nummbers I give it] )
Can this be done somehow? I need it to work on DB's like Oracle and MS Access, and I don't think Access supports stored procedure (although I don't know much about these).
Thanx
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
What about a simple WHERE clause on indexnum?
select indexnum
from tblData
where not (indexnum between @lowerBound and @higherBound) or maybe
select indexnum
from tblData
where not (indexnum >= @lowerBound and indexnum <= @higherBound)
|
|
|
|
|
This is me being lazy and not trying it, but asking a question first
Given that indexnum is a text string, will this comparison work? For example :
"00000007"
"00000008"
"0000000C"
if we ran the sql query for "00000007" to "0000000C", would it return :
"00000009"
"0000000A"
"0000000B"
????
I didn't think the database would be so smart as to count in hex using text strings.
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
Well, if your being lazy means more work for me, then I one-up your laziness with some of my own Try it out and see what you get.
I think most databases consider "8,9,A,B,C" an ascending text sort.
|
|
|
|
|
Well touche. I respect your lazyness and bow down to it. I've been out-slothed. I will therefore try this out hehe
Thanx Mike.
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
Hi
I have a databound ListBox and I edit a row as follows :
DataRowView Row=((DataRowView)lst.SelectedItem);
Row.BeginEdit();
Row["name"]=frmEdit.txtName.Text;
Row.EndEdit();
After the EndEdit the edited item disappears from the list..
So I'm trying to set the RowStateFilter of the dataview (that the listbox is boud to) and tried several combinations of the DataViewRowState enum but I can't make all rows appear (unchanged/added/changed)
Any help ???
|
|
|
|
|
I normally use Oracle and I haven't been able to figure out the appropriate escape characters to allow the SELECT option to work properly for a given situation.
Given the following:
string newValue = "Joe's Place";<br />
string searchValue = newValue.Replace("'",@"\'");<br />
DataRow[] dr = dataTable.Select(displayMember+"='"+searchValue+"'");
newValue is actually a parameter into the method but when it's contents include an apostrophe, I get the error such as Missing operand after 's' operator. The code worked for all situations until I hit an apostrophe so I added the conversion of the apostrophe to what I thought was the appropriate escape sequence {newValue.Replace()}. But it doesn't seem to matter what value is searched, I still get the error.
What should I have done? Are there any other characters I need to be aware of other than the apostrophe?
Thanks
|
|
|
|
|
Have you tried:
string searchValue = newValue.Replace("'","''");
|
|
|
|