Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conecting To SQLServer through ODBC

Status
Not open for further replies.

da75

Programmer
Dec 4, 2002
7
GB
Hi Everyone

I am connecting to SQL Server through ODBC, i think i have connected using shared access to the database and also read and write access. The program i am running is selecting from the database fine, When it comes to inserting the project doesn't bomb out but it does not insert the details into the database. Below is my code, to connect to the database.
Any Ideas?

ODBCName = "ODBC;UID=***;PWD=****;DSN=SMSSQL"
DBName = ""

Set MyWorkSpace = Workspaces(0)
Set dbsSERVER = MyWorkSpace.OpenDatabase(DBName, False, False, ODBCName)
 
da75,
I would double check the SQL permissions; access to tables, default table, permissions to tables, etc.

I don't have too much experience in SQL but when I'm building statements to use in VB I try them out in Query Analyser as sometimes I've missed out a little syntax. Also, if you connect in Query Analyser using the same login as is in your code you can check the permissions.

prankine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top