TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Amsterdammed on June 15, 2010, 12:32:03 PM
-
Hello everybody,
I'm working with a new vertical and they use a dbase in MSSQL, and I can't work it out with the Fleming group stuff.
I want to extend that vertical with useful things (as I dud with the other I work with for another client). Therefore I would need to read from and write to that dbase. This is what I have on information
Provider : System.Data.SqlClient
Connectionstring : Server=(local)\SQLExpress;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TechlineSQL
Schema : dbo.
Does any body know how i can get access to that dbase?
Thanks in Advance
Bernd
-
Check this one http://www.theswamp.org/index.php?topic=28286.0 (http://www.theswamp.org/index.php?topic=28286.0)
-
Another way: http://www.fleming-group.com/
-
Another way: http://www.fleming-group.com/
because Microsoft have not released a 64 bit version of the Jet Driver ADO.LSP will not work in an AutoCAD 64bit System.
-
Oops... Thank you for information.
-
Actually, I am pretty sure you can connect to MSSQL server if you use its provider. something like
"Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername; Pwd=myPassword;"
-
this quick test works to connect
(defun c:doit ( / )
(vl-load-com)
(setq co (vlax-create-object "ADODB.Connection"))
(vlax-invoke-method co 'open
"Provider=SQLNCLI10;Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\Daniel\\Desktop\\meserver.mdf;Initial Catalog=meserver;Integrated Security=SSPI;"
"" "" nil)
)
-
Daniel,
sorry, i was trapped in drafting work and had no time to develop things. I checked your approach but get folling error
Foutmelding :Automation Error. Provider cannot be found. It may not be properly install
according to the info box in my vertical the provider should be
System.Data.SqlClient
to me this is all unknown territory, so i very much relay on setting it up once with the Swamps intel and then go from there, but i can't troubleshoot due to lack of sql knowledge.
Bernd
-
what version of MSSQL are you running?
-
Daniel,
good Question, it came with the vertical... Mircosoft SQL Server 2005 is that the MySQL, because that is all i can find.
Bernd
-
I'm just guessing here but try SQLNCLI instead of SQLNCLI10
-
Daniel,
you are the man, your guess was right. Connection works, no i have to find out how i can work with the data....
Thanks a lot!!
Bernd
-
If you have the connection string, just get in there and try modifying what's in Mr. Fleming's code :-)
-
right,
that is what i did before in Access as well, and he, it works great! It is not about knowledge alone these days, it is about to now where to find it.......
-
Daniel,
a new problem came up. This all works fine, now i see that the vertical uses the same dbase, and i can't not connect to it because it is already open.
Can i disconnect the connecting running at the time and reconnect myself?
Thanks,
bernd