all groups > sql server data mining > march 2004 >
You're in the

sql server data mining

group:

Cerating mining model from VB code...failing :-(


Cerating mining model from VB code...failing :-( Sinex
3/20/2004 12:50:53 PM
sql server data mining:
Hi !
I have SQL Server2K on my machine. I want to create a decision tree model
from my VB application.
I created an ADODB connection first (uses the MSDMine.1 provider). Then I
tried to execute the following statement:

DC.Execute "INSERT INTO " & DMMName & " " & _
"(SKIP, [EMP_CARD_INDEX], [BuildingNo], [FloorNo], [Yr], [Qtr], [Mon],
[DayInWeek], [WeekInMon], [HrInDay], [MininHr], [Swipe]) " & _
"OPENROWSET('SQLOLEDB.1', 'Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=[RDT_ACPAD];Data
Source=[ie10-alttest]'," & _
"'SELECT DISTINCT `dbo.CardData.EMP_INDEX` AS `EMP_INDEX`," & _
"`dbo.CardData.EMP_CARD_INDEX` AS `EMP_CARD_INDEX`," & _
"`dbo.CardData.BuildingNo` AS `BuildingNo`," & _
"`dbo.CardData.FloorNo` AS `FloorNo`," & _
"`dbo.CardData.Yr` AS `Yr`," & _
"`dbo.CardData.Qtr` AS `Qtr`," & _
"`dbo.CardData.Mon` AS `Mon`," & _
"`dbo.CardData.DayInWeek` AS `DayInWeek`," & _
"`dbo.CardData.WeekInMon` AS `WeekInMon`," & _
"`dbo.CardData.HrInDay` AS `HrInDay`," & _
"`dbo.CardData.MininHr` AS `MininHr`," & _
"`dbo.CardData.Swipe` AS `Swipe` FROM dbo.CardData.')"

But at runtime I get an error that says:
Connection failed with error '[DBNETLIB][ConnectionOpen(Connect())]SQL
Server does not exist or access denied;08001'on provider 'SQLOLEDB.1'


Am i missing something here? Pls help :-(

...Sinex

Re: Cerating mining model from VB code...failing :-( Jamie MacLennan (MS)
3/22/2004 10:14:43 AM
Can you connect with that connection string using RowsetViewer or
QueryAnalyzer?

--

-Jamie MacLennan
SQL Server Data Mining
This posting is provided "AS IS" with no warranties, and confers no rights.
[quoted text, click to view]

AddThis Social Bookmark Button