Does anyone have a routine that interrogates tables looking for
specific values. I as a basic routine that works using MS Access. I
first create a table that has all the table names and field names per
table, like:
xyzField
Table Field
Table1 Field1
Table1 Field2
Table1 Field3
Table2 Field1
Table2 Field2
Table2 Field3
...
xyzResults has three text columns:
TableName, FieldName, SearchValue
The I run the routine:
Function InterrogateDB()
On Error GoTo Err_Line
Dim db As DAO.Database
Dim rsXYZFields As DAO.Recordset
Dim mTable As String
Dim mField As String
Dim strSQL As String
Dim strFIND As String
strFIND = InputBox("Enter the field name fragment:")
Set db = CurrentDb
'Open the Table/Fields table
Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
With rsXYZFields
.MoveFirst
Do Until .EOF
mTable = "[" & Trim(.Fields(0)) & "]"
mField = "[" & Trim(.Fields(1)) & "]"
If DCount("*", mTable, mField & " Like '*" & _
strFIND & "*'") > 0 Then
strSQL = "INSERT INTO xyzResults ( TableName, " &
_
"FieldName, SearchValue ) VALUES ( '" & mTable &
"', '" & _
mField & "', '" & strFIND & "' )"
db.Execute strSQL, dbFailOnError
End If
.MoveNext
Loop
End With
rsXYZFields.Close
Set rsXYZFields = Nothing
db.Close
Set db = Nothing
Exit Function
Err_Line:
MsgBox "Error occurred when inserting record"
Resume Next
End Function
==============================
It prompts me for the value that I am looking for, then interrogates
all the tables and fields for that value. Is there a procedure
similar to this I can use in SQL Server?
Any help appreciated!
Thanks,
RBollingerHi
"robboll" wrote:
> Does anyone have a routine that interrogates tables looking for
> specific values. I as a basic routine that works using MS Access. I
> first create a table that has all the table names and field names per
> table, like:
> xyzField
> Table Field
> Table1 Field1
> Table1 Field2
> Table1 Field3
> Table2 Field1
> Table2 Field2
> Table2 Field3
> ...
> xyzResults has three text columns:
> TableName, FieldName, SearchValue
> The I run the routine:
> Function InterrogateDB()
> On Error GoTo Err_Line
>
> Dim db As DAO.Database
> Dim rsXYZFields As DAO.Recordset
> Dim mTable As String
> Dim mField As String
> Dim strSQL As String
> Dim strFIND As String
> strFIND = InputBox("Enter the field name fragment:")
> Set db = CurrentDb
> 'Open the Table/Fields table
> Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
>
> With rsXYZFields
> .MoveFirst
> Do Until .EOF
> mTable = "[" & Trim(.Fields(0)) & "]"
> mField = "[" & Trim(.Fields(1)) & "]"
> If DCount("*", mTable, mField & " Like '*" & _
> strFIND & "*'") > 0 Then
> strSQL = "INSERT INTO xyzResults ( TableName, " &
> _
> "FieldName, SearchValue ) VALUES ( '" & mTable &
> "', '" & _
> mField & "', '" & strFIND & "' )"
> db.Execute strSQL, dbFailOnError
> End If
> .MoveNext
> Loop
> End With
> rsXYZFields.Close
> Set rsXYZFields = Nothing
> db.Close
> Set db = Nothing
> Exit Function
>
> Err_Line:
> MsgBox "Error occurred when inserting record"
> Resume Next
> End Function
> ==============================> It prompts me for the value that I am looking for, then interrogates
> all the tables and fields for that value. Is there a procedure
> similar to this I can use in SQL Server?
> Any help appreciated!
> Thanks,
> RBollinger
>
Have you checked out
http://www.users.drew.edu/skass/sql/SearchAllTables.sql.txt
John
Showing posts with label specific. Show all posts
Showing posts with label specific. Show all posts
Friday, February 24, 2012
Sunday, February 19, 2012
Interrogating SQL Server Tables for Specific Values
Does anyone have a routine that interrogates tables looking for
specific values. I as a basic routine that works using MS Access. I
first create a table that has all the table names and field names per
table, like:
xyzField
Table Field
Table1 Field1
Table1 Field2
Table1 Field3
Table2 Field1
Table2 Field2
Table2 Field3
...
xyzResults has three text columns:
TableName, FieldName, SearchValue
The I run the routine:
Function InterrogateDB()
On Error GoTo Err_Line
Dim db As DAO.Database
Dim rsXYZFields As DAO.Recordset
Dim mTable As String
Dim mField As String
Dim strSQL As String
Dim strFIND As String
strFIND = InputBox("Enter the field name fragment:")
Set db = CurrentDb
'Open the Table/Fields table
Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
With rsXYZFields
.MoveFirst
Do Until .EOF
mTable = "[" & Trim(.Fields(0)) & "]"
mField = "[" & Trim(.Fields(1)) & "]"
If DCount("*", mTable, mField & " Like '*" & _
strFIND & "*'") > 0 Then
strSQL = "INSERT INTO xyzResults ( TableName, " &
_
"FieldName, SearchValue ) VALUES ( '" & mTable &
"', '" & _
mField & "', '" & strFIND & "' )"
db.Execute strSQL, dbFailOnError
End If
.MoveNext
Loop
End With
rsXYZFields.Close
Set rsXYZFields = Nothing
db.Close
Set db = Nothing
Exit Function
Err_Line:
MsgBox "Error occurred when inserting record"
Resume Next
End Function
==============================
It prompts me for the value that I am looking for, then interrogates
all the tables and fields for that value. Is there a procedure
similar to this I can use in SQL Server?
Any help appreciated!
Thanks,
RBollingerHi
"robboll" wrote:
> Does anyone have a routine that interrogates tables looking for
> specific values. I as a basic routine that works using MS Access. I
> first create a table that has all the table names and field names per
> table, like:
> xyzField
> Table Field
> Table1 Field1
> Table1 Field2
> Table1 Field3
> Table2 Field1
> Table2 Field2
> Table2 Field3
> ...
> xyzResults has three text columns:
> TableName, FieldName, SearchValue
> The I run the routine:
> Function InterrogateDB()
> On Error GoTo Err_Line
>
> Dim db As DAO.Database
> Dim rsXYZFields As DAO.Recordset
> Dim mTable As String
> Dim mField As String
> Dim strSQL As String
> Dim strFIND As String
> strFIND = InputBox("Enter the field name fragment:")
> Set db = CurrentDb
> 'Open the Table/Fields table
> Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
>
> With rsXYZFields
> .MoveFirst
> Do Until .EOF
> mTable = "[" & Trim(.Fields(0)) & "]"
> mField = "[" & Trim(.Fields(1)) & "]"
> If DCount("*", mTable, mField & " Like '*" & _
> strFIND & "*'") > 0 Then
> strSQL = "INSERT INTO xyzResults ( TableName, " &
> _
> "FieldName, SearchValue ) VALUES ( '" & mTable &
> "', '" & _
> mField & "', '" & strFIND & "' )"
> db.Execute strSQL, dbFailOnError
> End If
> .MoveNext
> Loop
> End With
> rsXYZFields.Close
> Set rsXYZFields = Nothing
> db.Close
> Set db = Nothing
> Exit Function
>
> Err_Line:
> MsgBox "Error occurred when inserting record"
> Resume Next
> End Function
> ==============================
> It prompts me for the value that I am looking for, then interrogates
> all the tables and fields for that value. Is there a procedure
> similar to this I can use in SQL Server?
> Any help appreciated!
> Thanks,
> RBollinger
>
Have you checked out
http://www.users.drew.edu/skass/sql...lTables.sql.txt
John
specific values. I as a basic routine that works using MS Access. I
first create a table that has all the table names and field names per
table, like:
xyzField
Table Field
Table1 Field1
Table1 Field2
Table1 Field3
Table2 Field1
Table2 Field2
Table2 Field3
...
xyzResults has three text columns:
TableName, FieldName, SearchValue
The I run the routine:
Function InterrogateDB()
On Error GoTo Err_Line
Dim db As DAO.Database
Dim rsXYZFields As DAO.Recordset
Dim mTable As String
Dim mField As String
Dim strSQL As String
Dim strFIND As String
strFIND = InputBox("Enter the field name fragment:")
Set db = CurrentDb
'Open the Table/Fields table
Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
With rsXYZFields
.MoveFirst
Do Until .EOF
mTable = "[" & Trim(.Fields(0)) & "]"
mField = "[" & Trim(.Fields(1)) & "]"
If DCount("*", mTable, mField & " Like '*" & _
strFIND & "*'") > 0 Then
strSQL = "INSERT INTO xyzResults ( TableName, " &
_
"FieldName, SearchValue ) VALUES ( '" & mTable &
"', '" & _
mField & "', '" & strFIND & "' )"
db.Execute strSQL, dbFailOnError
End If
.MoveNext
Loop
End With
rsXYZFields.Close
Set rsXYZFields = Nothing
db.Close
Set db = Nothing
Exit Function
Err_Line:
MsgBox "Error occurred when inserting record"
Resume Next
End Function
==============================
It prompts me for the value that I am looking for, then interrogates
all the tables and fields for that value. Is there a procedure
similar to this I can use in SQL Server?
Any help appreciated!
Thanks,
RBollingerHi
"robboll" wrote:
> Does anyone have a routine that interrogates tables looking for
> specific values. I as a basic routine that works using MS Access. I
> first create a table that has all the table names and field names per
> table, like:
> xyzField
> Table Field
> Table1 Field1
> Table1 Field2
> Table1 Field3
> Table2 Field1
> Table2 Field2
> Table2 Field3
> ...
> xyzResults has three text columns:
> TableName, FieldName, SearchValue
> The I run the routine:
> Function InterrogateDB()
> On Error GoTo Err_Line
>
> Dim db As DAO.Database
> Dim rsXYZFields As DAO.Recordset
> Dim mTable As String
> Dim mField As String
> Dim strSQL As String
> Dim strFIND As String
> strFIND = InputBox("Enter the field name fragment:")
> Set db = CurrentDb
> 'Open the Table/Fields table
> Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
>
> With rsXYZFields
> .MoveFirst
> Do Until .EOF
> mTable = "[" & Trim(.Fields(0)) & "]"
> mField = "[" & Trim(.Fields(1)) & "]"
> If DCount("*", mTable, mField & " Like '*" & _
> strFIND & "*'") > 0 Then
> strSQL = "INSERT INTO xyzResults ( TableName, " &
> _
> "FieldName, SearchValue ) VALUES ( '" & mTable &
> "', '" & _
> mField & "', '" & strFIND & "' )"
> db.Execute strSQL, dbFailOnError
> End If
> .MoveNext
> Loop
> End With
> rsXYZFields.Close
> Set rsXYZFields = Nothing
> db.Close
> Set db = Nothing
> Exit Function
>
> Err_Line:
> MsgBox "Error occurred when inserting record"
> Resume Next
> End Function
> ==============================
> It prompts me for the value that I am looking for, then interrogates
> all the tables and fields for that value. Is there a procedure
> similar to this I can use in SQL Server?
> Any help appreciated!
> Thanks,
> RBollinger
>
Have you checked out
http://www.users.drew.edu/skass/sql...lTables.sql.txt
John
Interrogating SQL Server Tables for Specific Values
Does anyone have a routine that interrogates tables looking for
specific values. I as a basic routine that works using MS Access. I
first create a table that has all the table names and field names per
table, like:
xyzField
Table Field
Table1 Field1
Table1 Field2
Table1 Field3
Table2 Field1
Table2 Field2
Table2 Field3
...
xyzResults has three text columns:
TableName, FieldName, SearchValue
The I run the routine:
Function InterrogateDB()
On Error GoTo Err_Line
Dim db As DAO.Database
Dim rsXYZFields As DAO.Recordset
Dim mTable As String
Dim mField As String
Dim strSQL As String
Dim strFIND As String
strFIND = InputBox("Enter the field name fragment:")
Set db = CurrentDb
'Open the Table/Fields table
Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
With rsXYZFields
.MoveFirst
Do Until .EOF
mTable = "[" & Trim(.Fields(0)) & "]"
mField = "[" & Trim(.Fields(1)) & "]"
If DCount("*", mTable, mField & " Like '*" & _
strFIND & "*'") > 0 Then
strSQL = "INSERT INTO xyzResults ( TableName, " &
_
"FieldName, SearchValue ) VALUES ( '" & mTable &
"', '" & _
mField & "', '" & strFIND & "' )"
db.Execute strSQL, dbFailOnError
End If
.MoveNext
Loop
End With
rsXYZFields.Close
Set rsXYZFields = Nothing
db.Close
Set db = Nothing
Exit Function
Err_Line:
MsgBox "Error occurred when inserting record"
Resume Next
End Function
==============================
It prompts me for the value that I am looking for, then interrogates
all the tables and fields for that value. Is there a procedure
similar to this I can use in SQL Server?
Any help appreciated!
Thanks,
RBollinger
Hi
"robboll" wrote:
> Does anyone have a routine that interrogates tables looking for
> specific values. I as a basic routine that works using MS Access. I
> first create a table that has all the table names and field names per
> table, like:
> xyzField
> Table Field
> Table1 Field1
> Table1 Field2
> Table1 Field3
> Table2 Field1
> Table2 Field2
> Table2 Field3
> ...
> xyzResults has three text columns:
> TableName, FieldName, SearchValue
> The I run the routine:
> Function InterrogateDB()
> On Error GoTo Err_Line
>
> Dim db As DAO.Database
> Dim rsXYZFields As DAO.Recordset
> Dim mTable As String
> Dim mField As String
> Dim strSQL As String
> Dim strFIND As String
> strFIND = InputBox("Enter the field name fragment:")
> Set db = CurrentDb
> 'Open the Table/Fields table
> Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
>
> With rsXYZFields
> .MoveFirst
> Do Until .EOF
> mTable = "[" & Trim(.Fields(0)) & "]"
> mField = "[" & Trim(.Fields(1)) & "]"
> If DCount("*", mTable, mField & " Like '*" & _
> strFIND & "*'") > 0 Then
> strSQL = "INSERT INTO xyzResults ( TableName, " &
> _
> "FieldName, SearchValue ) VALUES ( '" & mTable &
> "', '" & _
> mField & "', '" & strFIND & "' )"
> db.Execute strSQL, dbFailOnError
> End If
> .MoveNext
> Loop
> End With
> rsXYZFields.Close
> Set rsXYZFields = Nothing
> db.Close
> Set db = Nothing
> Exit Function
>
> Err_Line:
> MsgBox "Error occurred when inserting record"
> Resume Next
> End Function
> ==============================
> It prompts me for the value that I am looking for, then interrogates
> all the tables and fields for that value. Is there a procedure
> similar to this I can use in SQL Server?
> Any help appreciated!
> Thanks,
> RBollinger
>
Have you checked out
http://www.users.drew.edu/skass/sql/SearchAllTables.sql.txt
John
specific values. I as a basic routine that works using MS Access. I
first create a table that has all the table names and field names per
table, like:
xyzField
Table Field
Table1 Field1
Table1 Field2
Table1 Field3
Table2 Field1
Table2 Field2
Table2 Field3
...
xyzResults has three text columns:
TableName, FieldName, SearchValue
The I run the routine:
Function InterrogateDB()
On Error GoTo Err_Line
Dim db As DAO.Database
Dim rsXYZFields As DAO.Recordset
Dim mTable As String
Dim mField As String
Dim strSQL As String
Dim strFIND As String
strFIND = InputBox("Enter the field name fragment:")
Set db = CurrentDb
'Open the Table/Fields table
Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
With rsXYZFields
.MoveFirst
Do Until .EOF
mTable = "[" & Trim(.Fields(0)) & "]"
mField = "[" & Trim(.Fields(1)) & "]"
If DCount("*", mTable, mField & " Like '*" & _
strFIND & "*'") > 0 Then
strSQL = "INSERT INTO xyzResults ( TableName, " &
_
"FieldName, SearchValue ) VALUES ( '" & mTable &
"', '" & _
mField & "', '" & strFIND & "' )"
db.Execute strSQL, dbFailOnError
End If
.MoveNext
Loop
End With
rsXYZFields.Close
Set rsXYZFields = Nothing
db.Close
Set db = Nothing
Exit Function
Err_Line:
MsgBox "Error occurred when inserting record"
Resume Next
End Function
==============================
It prompts me for the value that I am looking for, then interrogates
all the tables and fields for that value. Is there a procedure
similar to this I can use in SQL Server?
Any help appreciated!
Thanks,
RBollinger
Hi
"robboll" wrote:
> Does anyone have a routine that interrogates tables looking for
> specific values. I as a basic routine that works using MS Access. I
> first create a table that has all the table names and field names per
> table, like:
> xyzField
> Table Field
> Table1 Field1
> Table1 Field2
> Table1 Field3
> Table2 Field1
> Table2 Field2
> Table2 Field3
> ...
> xyzResults has three text columns:
> TableName, FieldName, SearchValue
> The I run the routine:
> Function InterrogateDB()
> On Error GoTo Err_Line
>
> Dim db As DAO.Database
> Dim rsXYZFields As DAO.Recordset
> Dim mTable As String
> Dim mField As String
> Dim strSQL As String
> Dim strFIND As String
> strFIND = InputBox("Enter the field name fragment:")
> Set db = CurrentDb
> 'Open the Table/Fields table
> Set rsXYZFields = db.OpenRecordset("xyzField", dbOpenSnapshot)
>
> With rsXYZFields
> .MoveFirst
> Do Until .EOF
> mTable = "[" & Trim(.Fields(0)) & "]"
> mField = "[" & Trim(.Fields(1)) & "]"
> If DCount("*", mTable, mField & " Like '*" & _
> strFIND & "*'") > 0 Then
> strSQL = "INSERT INTO xyzResults ( TableName, " &
> _
> "FieldName, SearchValue ) VALUES ( '" & mTable &
> "', '" & _
> mField & "', '" & strFIND & "' )"
> db.Execute strSQL, dbFailOnError
> End If
> .MoveNext
> Loop
> End With
> rsXYZFields.Close
> Set rsXYZFields = Nothing
> db.Close
> Set db = Nothing
> Exit Function
>
> Err_Line:
> MsgBox "Error occurred when inserting record"
> Resume Next
> End Function
> ==============================
> It prompts me for the value that I am looking for, then interrogates
> all the tables and fields for that value. Is there a procedure
> similar to this I can use in SQL Server?
> Any help appreciated!
> Thanks,
> RBollinger
>
Have you checked out
http://www.users.drew.edu/skass/sql/SearchAllTables.sql.txt
John
Internet explorer script error
When trying to configure task scheduler on my mcafee virus scan i get the error notice: keyset does not exist The specific error is 0x80090016 It also says General page initialisation failed. An error has occurred attempting to retrieve task account onfo. You may continue editing task object but will be unable to change task account info. Does anyone have a solution so I can schedule automatic updates for my virus scanner?What's this got to do with Internet Explorer scripting?|||Sorry the original error was: Internet explorer script error. An error has occurred on the csript on this page. Error is: Keyset does not exist Line 719 Char7 after further attempts to schedule antivirus scans on mcafee I got the error notice I first listed in this forum|||
This is a forum for SQL Server Reporting Services, not virus scanners. I think you'll have more luck trying to post your problem at http://forums.mcafeehelp.com/.
|||I have also begun getting this error message and I do not use McAfee, I use Norton 2006. Since I installed it I get this error ?
|||Mcafee not able to sort this problem they suggested this forum but thankyou for your suggestion|||Try posting your issue to the ASP "Client Side Web Development" forum, which deals with "Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc".
http://forums.asp.net/130/ShowForum.aspx
They may be able to help you out. I'd try including alot more information, though:
what's the error number?|||I have the same problem with Norton and other items in task scheduler. Symantic responds that it is a Windows problem in Task Scheduler. Windows Article ID 246183 responds to this problem, but only applies to Windows 2000. It requires a change in the registry. Look at it and see if it helps.
Subscribe to:
Posts (Atom)