cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Error connecting with net driver v 4.0

matt3
Node Link

I am attempting to generate my first hello world (using vb.net ) but am running into the following error

Dim driver As IDriver = GraphDatabase.Driver("bolt://localhost:7687", AuthTokens.Basic("neo4j", "password"))
Dim session As IAsyncSession = driver.AsyncSession(Function(o) o.WithDatabase("neo4j"))
Dim cursor As IResultCursor = Await session.RunAsync("CREATE (n) RETURN n")

Error :
Error: Neo4j.Driver.ClientException: Driver is connected to a server that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality at Neo4j.Driver.Internal.Protocol.BoltProtocolV3.d__4.M

ps: Extremely new to this....

2 REPLIES 2

matt3
Node Link

figured this out.. should not using the v4.0 driver with the neo4j 3.5x as its not compatible. Instead use v 1.7x

Hey Matt,

Actually, the 4.0 driver is compatible with 3.5 versions of the database - the only thing you had wrong was using the WithDatabase("neo4j") bit.

This example C# works:

var driver = Neo4j.Driver.GraphDatabase.Driver("bolt://localhost:7687", AuthTokens.Basic("neo4j", "neo"), config => config.WithEncryptionLevel(EncryptionLevel.None));
var session = driver.AsyncSession();
var results = await session.RunAsync("MATCH (m:Movie) RETURN m");
await results.ForEachAsync(r => Console.WriteLine(r["m"].As<INode>().Properties["title"]));

The only real difference is that you should call:

Dim session As IAsyncSession = driver.AsyncSession()

instead of passing in the Function to define the database.

Sorry for the delay - and I hope that helps