Monday, March 19, 2012
how do i get started
questions. I am working on a project that requires a
mediium size data base and so MSDE look like a good fit.
Problem is that in all my VB 6.0 work i never did any data
base work and i cant find any good way to get started. I
am lookign for samples and things to help me conect, read
write and update tables. All the MSDN resources talk about
what you can do but none tell me how.
Thanks to any one who can help
"steven davis" <stevend@.parabit.com> wrote in message
news:24ed601c45fdb$8cabc380$a401280a@.phx.gbl...
> I hope some one can help with this most basic of
> questions. I am working on a project that requires a
> mediium size data base and so MSDE look like a good fit.
> Problem is that in all my VB 6.0 work i never did any data
> base work and i cant find any good way to get started. I
> am lookign for samples and things to help me conect, read
> write and update tables. All the MSDN resources talk about
> what you can do but none tell me how.
> Thanks to any one who can help
While this book is geared for MS Access/SQL Server developers, most, if not
all of the concepts (and code) will translate to what you need to do. I
highly recommend it.
Microsoft Access Developer's Guide to SQL Server
by Mary Chipman, Andy Baron
ISBN: 0672319446
Steve
|||Also another starter's book which uses MSDE is 'Beginning Visual Basic .Net databases' by Wrox
But what programming language are you using..
dev
"Steve Thompson" wrote:
> "steven davis" <stevend@.parabit.com> wrote in message
> news:24ed601c45fdb$8cabc380$a401280a@.phx.gbl...
> While this book is geared for MS Access/SQL Server developers, most, if not
> all of the concepts (and code) will translate to what you need to do. I
> highly recommend it.
> Microsoft Access Developer's Guide to SQL Server
> by Mary Chipman, Andy Baron
> ISBN: 0672319446
> Steve
>
>
|||"dev_kh" <devkh@.discussions.microsoft.com> wrote in message
news:11AF35E9-E1EA-45FE-A72A-E95F1AA734B3@.microsoft.com...
> Also another starter's book which uses MSDE is 'Beginning Visual Basic
..Net databases' by Wrox
> But what programming language are you using..
It sounded like VB 6 from his original post...
Steve
|||Hello.
Yes i am using vb 6.0. It looks to me like MSDE is simply
SQL 2000 with out the manager graphical interface. If that
is so then maybe i can just read an SQL & VB book. Am i
correct?
thanks.
>--Original Message--
>"dev_kh" <devkh@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:11AF35E9-E1EA-45FE-A72A-E95F1AA734B3@.microsoft.com...
is 'Beginning Visual Basic
>..Net databases' by Wrox
>It sounded like VB 6 from his original post...
>Steve
>
>.
>
|||hi,
<anonymous@.discussions.microsoft.com> ha scritto nel messaggio
news:2564501c46169$ef458eb0$a601280a@.phx.gbl...
> Hello.
> Yes i am using vb 6.0. It looks to me like MSDE is simply
> SQL 2000 with out the manager graphical interface. If that
> is so then maybe i can just read an SQL & VB book. Am i
> correct?
you are correct...
I've found
http://www.amazon.com/exec/obidos/AS...948653-0983837
quite intuitive for beginners... it's a little bit dated and offer no cover
about .Net.. but addresses quite all typical scenarios for MSDE solutions..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||My book "Hitchhiker's Guide to Visual Basic and SQL Server (6th Edition)"
should help quite a bit. Yes, it's a bit dated but focuses solely on SQL
Server (and MSDE).
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
<anonymous@.discussions.microsoft.com> wrote in message
news:2564501c46169$ef458eb0$a601280a@.phx.gbl...[vbcol=seagreen]
> Hello.
> Yes i am using vb 6.0. It looks to me like MSDE is simply
> SQL 2000 with out the manager graphical interface. If that
> is so then maybe i can just read an SQL & VB book. Am i
> correct?
> thanks.
>
> message
> is 'Beginning Visual Basic
Monday, March 12, 2012
How do I get a user's domain?
I need to provide a UI to get the information to add a windows login to a SqlServer database. The CREATE LOGIN Sql statment requires the user name as "DomainName\UserName". I can get a list of users in XML using the following code:
public static XmlDocument GetAllADDomainUsers(string DomainPath)
{
string domain;
XmlDocument doc = new XmlDocument();
doc.LoadXml("<users/>");
XmlElement elem;
DirectoryEntry searchRoot;
ArrayList allUsers = new ArrayList();
if (DomainPath.Length == 0)
{
DirectoryEntry entryRoot = new DirectoryEntry("LDAP://RootDSE");
domain = entryRoot.Properties["defaultNamingContext"][0].ToString();
}
else
domain = DomainPath;
searchRoot = new DirectoryEntry("LDAP://" + domain);
DirectorySearcher search = new DirectorySearcher(searchRoot);
search.Filter = "(&(objectClass=user)(objectCategory=person))";
search.PropertiesToLoad.Add("samaccountname");
search.PropertiesToLoad.Add("distinguishedname");
search.Sort.PropertyName = "samaccountname";
search.Sort.Direction = SortDirection.Ascending;
SearchResult result;
SearchResultCollection resultCol = search.FindAll();
if (resultCol != null)
{
for(int counter=0; counter < resultCol.Count; counter++)
{
result = resultCol[counter];
if (result.Properties.Contains("samaccountname"))
{
elem = doc.CreateElement("user");
doc.DocumentElement.AppendChild(elem);
elem.SetAttribute("name", (String)result.Properties["samaccountname"][0]);
elem.SetAttribute("distinguishedName", (String)result.Properties["distinguishedname"][0]);
}
}
}
return doc;
}
This works for listing the names but how do I get the NetBIOS domain name for a selected user as required by SqlServer? I have tried using TranslateName from secur32.dll. That works on some machines but for some reason on other machines, it returns a blank. Is there another way?
Thanks for your help,
Rob
System.Environment.UserDomainName gets the domain of the current user. However, I need to be able to get the domain of a user that could come from any of multiple domains instead of the current user and I also need to support version 1.1 of .Net Framwork which makes it more difficult...unless I'm missing something.
Any ideas?
Thanks,
Rob
Friday, March 9, 2012
How do I find out which DB have the Guest account on them
Also do you know if SP4 requires a reboot of the system?
Jim Abel wrote:
> How do I find out which DB's have the Guest account on them?
> Also do you know if SP4 requires a reboot of the system?
You can run sp_helplogins. For example:
Exec sp_helplogins 'DOMAIN\USER_NAME'
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Yes, SP4 requires a reboot.
"Jim Abel" wrote:
> How do I find out which DB's have the Guest account on them?
> Also do you know if SP4 requires a reboot of the system?
How do I find out which DB have the Guest account on them
Also do you know if SP4 requires a reboot of the system?Jim Abel wrote:
> How do I find out which DB's have the Guest account on them?
> Also do you know if SP4 requires a reboot of the system?
You can run sp_helplogins. For example:
Exec sp_helplogins 'DOMAIN\USER_NAME'
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Yes, SP4 requires a reboot.
"Jim Abel" wrote:
> How do I find out which DB's have the Guest account on them?
> Also do you know if SP4 requires a reboot of the system?
How do I find out which DB have the Guest account on them
Also do you know if SP4 requires a reboot of the system?Jim Abel wrote:
> How do I find out which DB's have the Guest account on them?
> Also do you know if SP4 requires a reboot of the system?
You can run sp_helplogins. For example:
Exec sp_helplogins 'DOMAIN\USER_NAME'
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Yes, SP4 requires a reboot.
"Jim Abel" wrote:
> How do I find out which DB's have the Guest account on them?
> Also do you know if SP4 requires a reboot of the system?