473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Connecting to SQL Server DB on web server

I'm trying to get Access 2003 to connect to Microsft SQL Server on a
web server.

I can open the linked table without any problem, but whenever I run the
code on my form, it returns this error: Datatyle mismatch in the query
expression.

Heres the Microsfot SQL Server details...

server: mssql.pipeten.com
username: budgete_kingsgate
password: thehub
database: budgete_kingsgate
And heres the code...

'open recordset
Dim CurrentUserCount As Integer
Dim CurrentUser As DAO.Recordset
Set db = CurrentDb
Set CurrentUser = db.OpenRecordset("SELECT * FROM Users " & _
"WHERE Users.Mobile_No='" & Cleanest_Mobile & "' AND
Users.PIN='" & txt_PIN & "'; ")
It's simply putting the content of an SQL query into a recordset.
thats not even hard. so can anyone understand why it isn't working?

Cheers
Phil.

Apr 2 '06 #1
1 1183
On 2 Apr 2006 01:29:13 -0800, bu*******@googlemail.com wrote:
I'm trying to get Access 2003 to connect to Microsft SQL Server on a
web server.

I can open the linked table without any problem, but whenever I run the
code on my form, it returns this error: Datatyle mismatch in the query
expression.

Heres the Microsfot SQL Server details...

server: mssql.pipeten.com
username: budgete_kingsgate
password: thehub
database: budgete_kingsgate
And heres the code...

'open recordset
Dim CurrentUserCount As Integer
Dim CurrentUser As DAO.Recordset
Set db = CurrentDb
Set CurrentUser = db.OpenRecordset("SELECT * FROM Users " & _
"WHERE Users.Mobile_No='" & Cleanest_Mobile & "' AND
Users.PIN='" & txt_PIN & "'; ")


Try the following:

Set CurrentUser = db.OpenRecordset("SELECT * FROM Users " & _
"WHERE Users.Mobile_No=" & Cleanest_Mobile & " AND & _
Users.PIN='" & txt_PIN & "'; ")

mike
Apr 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Google Mike | last post by:
After a lot of thought and research, and playing with FreeTDS and InlineTDS, as well as various ODBC connections, I have determined that the fastest and cheapest way to get up and going with PHP on...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
3
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to...
0
by: cj.snead | last post by:
Hello, I am having trouble connecting to a remote named instance of SQL Server via Pocket PC. I have had absolutely no luck connecting with VS 2005 (even to a default instance), so I wen't back...
3
by: Vinod R.Shenoy | last post by:
Hi All, Came across a post wherin you had helped somebody with a similar problem and was wondering if you could help us out with it. Our problem is , We have a development SQL Server 2000...
6
by: Todd Brewer | last post by:
Windows Server 2000 ASP.NET 2.0 SQL Server 2000 (on a physically seperate server) I moved an ASP.NET 2.0 application from a development server to production, and am getting the following error:...
10
by: mairhtin o'feannag | last post by:
Hello, I'm having problems connecting to my new v9 db box. The pertinent information is below: DB2_db2inst1 60000/tcp DB2_db2inst1_1 60001/tcp DB2_db2inst1_2 60002/tcp DB2_db2inst1_END...
2
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express...
2
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.