Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

I use access connection and i want to convert it to SQLConnections, I use SQL SERVER 2000.

The access Connection is:

dim Conn as new OleDbConnection( _

"Provider=Microsoft.Jet.OLEDB.4.0;" & _

"Data Source=C:\inetpub\wwwroot\R.mdb")

 

What will be the SQL Connection?

Is there another things that i have to change?

My DataBase = R

My Table is: tblUsers

I dont use UserID or Password.

I have been in http://www.stringconnections.com, but it still don't work, there are semantic errors.

Thank's.

  • Administrators
Posted

If you are connecting to SQLServer then use a SQLConnection rather than a OleDbConnection.

 

The connection string for a windows authenticated connection has the form of

"Data Source=;Initial Catalog=;Integrated Security=true"

 

if you are using SQL authentication then it would be

"Data Source=;Initial Catalog=;uid=;pwd=

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Hi

Thank's for your answer but i tried the next connection and it's not work, can you write the right string connection?

dim Conn as new OleDbConnection("Provider=" & "Microsoft.Jet.OLEDB.4.0;" & _

"Data Source=ServerName;Initial Catalog=DataBaseName;Integrated Security=true")

Thank's.

Posted

Hi

When i wrote:

dim Conn as new OleDbConnection("data Source=servername;Initial Catalog=DataSource;Integrated Security=true")

I got the next error:

An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

Thank's.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...