From: Madiya on 17 Mar 2010 00:43 Hi, How do I list all user tables in a SQL Server database? Once done I have to passon some commends also to all the listed tabled. I already have connection strings and also able to extract records as pe the criteria from one defined table but do not know how to loop thru the tables or table properties. Any pointers are appreciated. Regards, Madiya
From: Bob Phillips on 17 Mar 2010 05:25 Try this Set oConn = CreateObject("ADODB.Connection") oConn.Open sConnString Set oCat = CreateObject("ADOX.Catalog") Set oCat.ActiveConnection = oConn iRow = 1 For Each tbl In oCat.Tables If (tbl.Type <> "SYSTEM TABLE") Then sTableName = tbl.name cLength = Len(sTableName) iTestPos = 0 iStartpos = 1 Debug.Print sTableName End If Next tbl oConn.Close Set oCat = Nothing -- HTH Bob "Madiya" <madiya122(a)yahoo.co.uk> wrote in message news:112466a1-5c07-4784-8285-f2518a33511e(a)c34g2000pri.googlegroups.com... > Hi, > How do I list all user tables in a SQL Server database? > Once done I have to passon some commends also to all the listed > tabled. > > I already have connection strings and also able to extract records as > pe the criteria from one defined table but do not know how to loop > thru the tables or table properties. > > Any pointers are appreciated. > > Regards, > Madiya
From: Madiya on 18 Mar 2010 09:16 On Mar 17, 9:43 am, Madiya <madiya...(a)yahoo.co.uk> wrote: > Hi, > How do I list all user tables in a SQL Server database? > Once done I have to passon some commends also to all the listed > tabled. > > I already have connection strings and also able to extract records as > pe the criteria from one defined table but do not know how to loop > thru the tables or table properties. > > Any pointers are appreciated. > > Regards, > Madiya Somebody working with VBA and SQL?
From: Bob Phillips on 18 Mar 2010 11:29 Yes, I posted a reply yesterday. Bob "Madiya" <madiya122(a)yahoo.co.uk> wrote in message news:4d2ff8bd-4727-4d39-9b32-9ac9095974ba(a)k24g2000pro.googlegroups.com... On Mar 17, 9:43 am, Madiya <madiya...(a)yahoo.co.uk> wrote: > Hi, > How do I list all user tables in a SQL Server database? > Once done I have to passon some commends also to all the listed > tabled. > > I already have connection strings and also able to extract records as > pe the criteria from one defined table but do not know how to loop > thru the tables or table properties. > > Any pointers are appreciated. > > Regards, > Madiya Somebody working with VBA and SQL?
From: Madiya on 27 Mar 2010 08:08 On Mar 18, 8:29 pm, "Bob Phillips" <bob.phill...(a)somewhere.com> wrote: > Yes, I posted a reply yesterday. > > Bob > > "Madiya" <madiya...(a)yahoo.co.uk> wrote in message > > news:4d2ff8bd-4727-4d39-9b32-9ac9095974ba(a)k24g2000pro.googlegroups.com... > On Mar 17, 9:43 am, Madiya <madiya...(a)yahoo.co.uk> wrote: > > > Hi, > > How do I list all user tables in a SQL Server database? > > Once done I have to passon some commends also to all the listed > > tabled. > > > I already have connection strings and also able to extract records as > > pe the criteria from one defined table but do not know how to loop > > thru the tables or table properties. > > > Any pointers are appreciated. > > > Regards, > > Madiya > > Somebody working with VBA and SQL? Bob, Thanks but I could not find your reply. Can you Pl post back here or give me link to that msg pl. Regards, Madiya
|
Next
|
Last
Pages: 1 2 Prev: change date in a sql statement from a cell Next: Need Help with a cell? |