Real or single

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi, there

I'm creating a table for my Access database. Below is my code. I always got
a table I wanted no matter if I use "Single" or "Real" data type.

strSQL = "CREATE TABLE GeometryValues (" & _
"zNameID SmallInt NOT NULL PRIMARY KEY ," & _
"zValue Single NULL)"

or
strSQL = "CREATE TABLE GeometryValues (" & _
"zNameID SmallInt NOT NULL PRIMARY KEY ," & _
"zValue Real NULL)"

Dim cmd As New OleDbCommand(strSQL, Conn)

cmd.CommandType = CommandType.Text

cmd.ExecuteNonQuery()

note: conn is an open connection

My question is what data type should I choose, SqlDataType or OleDBType?

Thanks in advance

Peter
 
SqlDataType is for SQL Server only, OleDBType is for non-SQL Server data
sources.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top