Re: Could not convert variant of type (Null) into type (String)
From: Viatcheslav V. Vassiliev (support_at_oledbdirect.com)
Date: 02/27/05
- Next message: jason: "Re: Not enough Parameters?"
- Previous message: Rich S,: "Re: Using parameters with the low level ADO API, trying to avoid the memory leaks."
- In reply to: lotemlotad_at_yahoo.com: "Re: Could not convert variant of type (Null) into type (String)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 27 Feb 2005 22:56:54 +0300
Driver should be "SQL Server", not "SQLOLEDB" as you wrote - at least I can
not connect to MS SQL Server with DRIVER=SQLOLEDB.
DRIVER=SQL Server;SERVER=(local);DATABASE=pubs
This connection string works. But in this case you use OLEDB provider for
ODBC and ODBC driver for MS SQL Server. Connection string I shown uses
native OLEDB provider for MS SQL Server. You may find many posts in this
newsgroup why you should not use ODBC driver with ADO and specially MS SQL
Server. For example, in this thread.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
<lotemlotad@yahoo.com> сообщил/сообщила в новостях следующее:
news:4221e5c2@newsgroups.borland.com...
> Actualy i use this connection string when i work in
> D6 with MSSQL and ADO.
> If this is a the wrong string i will use yours but it seem to work well.
>
> Barak
>
>
> "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> news:4221a948@newsgroups.borland.com...
>> This one may work only in .Net for SqlConnection (without
> Driver=SQLOLEDB).
>> ADO uses another connection string:
>>
>> Provider=SQLOLEDB;Data Source=<Server>;Integrated Security=SSPI;Initial
>> Catalog=<Database>
>>
>> //------------------------------------------
>> Regards,
>> Vassiliev V. V.
>> http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
>> ADO.Net
>> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
>> MS Jet (Access) and Interbase (through OLEDB)
>>
>>
>> <lotemlotad@yahoo.com> сообщил/сообщила в новостях следующее:
>> news:422190a9$1@newsgroups.borland.com...
>> > Why can't you build the AdoConnection string?
>> > I use
>> > AdoConnection.ConnectionString :=
>> >
> 'Driver=SQLOLEDB;Server=Server;Database=Database_Name;Trusted_Connection=yes
>> > ;';
>> >
>> > And it work well.
>> >
>> > "zorba" <tjall@buziaczek.pl> wrote in message
>> > news:421f0687@newsgroups.borland.com...
>> >> >
>> >> >>I connect with SQL Server(MSDE) database using ADO(Microsoft OLE DB
>> >> >>Provider for ODBC Drivers).Durnig compilation occured exception
> "Could
>> >> >>not convert variant of type (Null) into type (String)". What's
> causing
>> >> >>that problem?
>> >> >Using ODBC when you should be using the OleDB provider for SQL Server
>> >> >--
>> >> >Brian Bushay (TeamB)
>> >> >Bbushay@NMPLS.com
>> >> >
>> >>
>> >> If I choose OleDB provider for SQL then I can't build ADOConnection
>> >> String ... server doesn't exists ... probably I try to switch on
>> >> Firebird :)
>> >>
>> >>
>> >>
>> >> --- posted by geoForum on http://delphi.newswhat.com
>> >
>> >
>>
>>
>
>
- Next message: jason: "Re: Not enough Parameters?"
- Previous message: Rich S,: "Re: Using parameters with the low level ADO API, trying to avoid the memory leaks."
- In reply to: lotemlotad_at_yahoo.com: "Re: Could not convert variant of type (Null) into type (String)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|