|
Well, had Dave not stepped in, I would have answered in more detail. The truth is, I give a first answer that means that anyone with access to google has all they need. Anyone who proves incapable of using google, or perhaps, understanding what MSDN says, I will give deeper help. But, spoon feeding people on every simple question, that can be answered by google in seconds, is not helping them. I'm trying to teach people how to search for information themselves, when the question is trivial.
And that's what someone who wants to help *should* be doing. No matter what your opinion, if you ask more, I will answer again. I don't keep track of what people say in the past, or keep a list of people to help, or not help.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
It wasn't the topic of random numbers that was giving you the problem. The Random class is just like any other. Instantiate the class, which is then called an "object", then call the methods or set properties on it. The entire .NET Framework works, at a minimum, just like this.
There is, of course, far more to the rest of the Framework, but once you understand the basics of how to instantiate a simple class, like Random, and use it, you can pretty much find your way through the MSDN documentation and figure out how more complex classes work.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi! Counld you help me please?
I want to get the name of SQLServer 2000 and put it into a combobox, SQLServer may be on my computor and may be on Server in my network (my computor is a workstation but it has SQLServer 2000 too). How can I do that, I until use vb.net 2003
Thanks a lot.
|
|
|
|
|
|
|
|
i use vb.net 2003 and not c #
|
|
|
|
|
Hi!
I had refer that URL, but until get error message
I had reference SQLDMO and declare:
private SQLDMO.Application sqlApp = new SQLDMO.ApplicationClass();
SQLDMO.NameList sqlServers=null;
this is my code:
private void Form1_Load(object sender, System.EventArgs e)
{
try
{
sqlServers = sqlApp.ListAvailableSQLServers();
for(int i=0;i<sqlServers.Count;i++)
{
object srv = sqlServers.Item( i + 1);
if(srv != null)
{
this.cboServers.Items.Add(srv);
}
}
if(this.cboServers.Items.Count > 0)
this.cboServers.SelectedIndex = 0;
else
this.cboServers.Text = "<No available SQL Servers>";
}
catch(Exception err)
{
MessageBox.Show(err.ToString(),"Error");
}
}
and i get an error:
System.InvalidCastException:QueryInterface for interface SQLDMO.NameList faild at SQLDMO.ApplicationClass.ListAvailableSQLServer() at ....
Cuold you help me, please.
|
|
|
|
|
Hi
I hope this is the right forum for ths, if not, please direct me to the right one.
I looked at DAAB Ent LIb 2.0 January 2006 release. But I did not want to sprinkle the DAAB DLLs all over my different applications. Also, I wanted to de couple my dependency
on DAAB such that when a newer version comes and there are breaking changes, I can make
those changes only in the wrapper and not in all my projects.
Hence I wanted to create a wrapper on top of it.
I created a wrapper allright, my idea was that I would return data readers, datasets
and adapters from the wrapper. I would then use this wrapper in my app logic layer to get/set data.
However, as the reader requires an active connection, I could not pass it through layers.
Same for Command objects.
I could, however, pass the data table from the populated dataset.
Then I exposed a GetConnection method from the wrapper and returned the conn object.
I would then use it in App Logic layer to create a datareader etc.
However, this approach seems like a hack rather than an elegant solution.
Any ideas about how I can go about this?
Shreekar
|
|
|
|
|
shreekar wrote: I would then use it in App Logic layer to create a datareader etc.
However, this approach seems like a hack rather than an elegant solution.
Any ideas about how I can go about this?
Data Readers, Connections and so on should stay in the DAL (Data Abstraction Layer - i.e. your wrapper). If you must, create data tables and data sets to pass data out of the DAL. It isn't something I'd do, but it is the easiest thing to do.
|
|
|
|
|
Thanks a lot for your comments. I think I will settle with the datatable solution for now.
On a side note, I have read somewhere that the TableAdapter can be used as a replacement for DAAB. Currently, I am using TableAdapters in some forms of the application and after I resolved the connection string issue, it seems to work well. But I am not fully convinced about how well it will handle header-detail or multiple table relationships.
The way I see it, using the Table Adapters, I get strongly typed datasets which I will miss in DAAB, but in DAAB, I can design the App Logic Layer and sort of keep it separate from the DAL.
Before going the full distance with the DAAB/Table Adapters, I would like to know the pros and cons between using DAAB and Table Adapters.
Any thoughts on this?
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
shreekar wrote: TableAdapter can be used as a replacement for DAAB
Do you mean DataAdapter?
shreekar wrote: Any thoughts on this?
I don't use DataAdapters at all. I find they don't give me the control that I want. They produce overly large and cumbersome DataSets with lots of functionality that I don't need. I use my own solution that dumps data in to Data Transfer Objects [DTOs] (basically a very simple class that contains nothing but fields and properties that relate directly to the columns being returned from the database). It is probably too much to explain in a forum post but I got the idea from the way DotNetNuke deals with the database (Search on DotNetNuke Data Provider for articles on how their implementation works). Each DTO is very lightweight, typesafe and can work with the DAAB.
|
|
|
|
|
Well, I did mean TableAdapters - the new thing introduced with VS 2005 (not a part of .Net 2.0)
The mapping of fields and columns with the properties is the most natural mapping IMHO and the App Logic layer would have that ultimately in one form or another.
My question is - what is the better approach between such mapping and TableAdapters.
Shreekar
|
|
|
|
|
Help me!
Thank you very much
|
|
|
|
|
You can use typed datatypes.
fill then using sql server, and set the report source to them in your crystal report.
Steve
|
|
|
|
|
Initialy i've taken the fileName and i want to take filename's contents the Datas.And i want to directly store in Access Database 2000
How to take the file's condents and one more thing i want to store the file's contents directly in AccessDatabase 2000.so pls some one help me.....
thanking You
somasundaram
|
|
|
|
|
File.GetAllBytes, or something. Then, you need to create a field that can hold the data ( a BLOB? ) and push it in.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I've put the code it won't the execute So pls some one help me vry vry Urgent
Thankig you
somasundaram
|
|
|
|
|
What code ?
Are you using VB2005 ? Have you heard of google ? Why is it that so many people need urgently to know how to do something that's widely documented, but are unable to search for it ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Very sorry,no iam using VB.Net 2003, ok u carry on pls tel me....
I want to join in the website
|
|
|
|
|
OK, then you don't have access to File.ReadAllBytes, I don't believe. The system.IO namespace contains the File object, which you'd use to read the bytes of a file. Then, you just need to google for soemthing like store bytes access VB.NET to get the second half together.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thank you
Thanking you
somasundaram
|
|
|
|
|
Hello
using vs 2005
I have a datagridview and i would like to loop through and hide rows based on a cell condition. For example, if the user want to hide all the rows that has "Serviced" in the status column.
code so far
<br />
dim i as integer<br />
for i = 0 to ds.tables(0).rows.count - 1<br />
if(serviced = true) then<br />
'hide this row<br />
next i<br />
thanks in advance,
Steve
|
|
|
|
|
Hi Steve
Simply make the RowHeight 0
Eldie
|
|
|
|
|
Sir/Madam,
I am facing the problem in the query implementation in vb.net.Like I have an id that is present in 5 tables(like table1,table2,table3,table4,table5).I have to pick those records from table1 which are not present in tabl15.I mean an id number 1 is present in table1,table2,table3,table4 .but the id number 1 is not present in table5.My final motive is i have to pick all the id like 1.
i am using the query in the following way.
dim str as string = "Select able1.field1,table2.field1,table3.field1,table4.field1
from table1,table2,table3,table4,table5
where
(table1.id<>table5.id and table2.id <> table5.id and table3.id <> table5.id
and table4.id<> table5.id)
it is showing those records that are not present in table5 but present in the remaining tables.
But the problem is , there occured duplicacy.I mean one record is iterating 24 times i the final result.
Please help.
Thanks and Regards
Pankaj
|
|
|
|