Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK - here's what I've got so far:-
_____ Public Function IPLookup(ipadd As String) As Variant Dim sqlString As String Dim objConn As ADODB.Connection Dim objRS As ADODB.Recordset sqlString = "SELECT <valid stuff FROM <valid stuff WHERE <valid stuff='" & ipadd & "' " objConn.ConnectionString = "ODBC;DSN=blah;UID=blah;PWD=blah;APP=Microsoft Office 2003;WSID=blah;DATABASE=blah;" objConn.Open Set objRS = New ADODB.Recordset Set objRS = objConn.Execute(sqlString) IPLookup = objRS(0).Value 'Release the recordset and connection objRS.Close objConn.Close Set objRS = Nothing Set objConn = Nothing End Function ____ this just returns #Value for input parameters i know are correct. is thtis a type-mismatch issue, or am i missing something else? Thanks, Neil. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using SUM function in MS QUERY with ODBC | Excel Discussion (Misc queries) | |||
SQL Query, Can you embed a function call? | Excel Discussion (Misc queries) | |||
SQL Query, Embedding a Function Call | Excel Discussion (Misc queries) | |||
Problem with .Background Query option of ODBC Query | Excel Programming | |||
ODBC Call failed Error 3146 only on some PC's | Excel Programming |