Giter VIP home page Giter VIP logo

Comments (2)

sijms avatar sijms commented on July 24, 2024

connection string format supported:
conn, err := sql.Open("oracle", "oracle://user:pass@server/service_name")

see description in code page

from go-ora.

simulot avatar simulot commented on July 24, 2024

The connection string seems correct.

When server or port is incorrect, I get a neat error:

dial tcp: lookup myserver: no such host
dial tcp 10.30.194.77:1571: connectex: No connection could be made because the target machine actively refused it.

When the server and port are correct, I get a panic. The packetData is 12 bytes long, and the panic is issued when retrieving message after the 12th byte.

func newRefusePacketFromData(packetData []byte) *RefusePacket {
	if len(packetData) < 12 { // 12
		return nil
	}
	dataLen := binary.BigEndian.Uint16(packetData[10:]) // 356
	return &RefusePacket{
		packet: Packet{
			dataOffset: 12,
			length:     binary.BigEndian.Uint16(packetData),
			packetType: PacketType(packetData[4]),
			flag:       0,
		},
		SystemReason: packetData[9], // 0
		UserReason:   packetData[8],  // 34
		message:      string(packetData[12 : 12+dataLen]), // crash here!
	}
}

from go-ora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.