Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old July 28th, 2005, 05:05 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

i'm using DSN.i get a host and they set up a DSN for me and sent it for me.the DSN name that they gave me is and ip addres.and my sql server in their server hase a name,user name and password.
yes i copied oConn from windows application.my server is not located in my local machine it is a remote server.you mean oConn is my connetion string?

Reply With Quote
  #12 (permalink)  
Old July 28th, 2005, 05:21 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

No, oConn is probaly the connection object, but this depends on the rest of the code....

You need to assign the connection string (with the DSN) or use it in the Open command:

oConn.Open "dsn=mydsn"

or

oConn.ConnectionString = "dsn=mydsn"
oConn.Open

It looks like you're missing a few important basic concepts in working with ADO connection objects. I think you need to pick up a good book about this or do some Googling....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #13 (permalink)  
Old July 28th, 2005, 05:42 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

yes you are correct i'm really confused i think i should study more about ADO.thank you

Reply With Quote
  #14 (permalink)  
Old July 29th, 2005, 07:32 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

i write this code i my connectin page but it gives me error againshould i add this codes to all pages serately?cant i use it in my connection page?
<%
Dim QCcon as New ADODB-connection

QCcon.open
Dim MM_QCcon_STRING as String
MM_QCcon_STRING="Driver={SQL Server};Server=sql.bekr.net;Database=host064;Uid=s a;Pwd=56ghj;"


%>

Reply With Quote
  #15 (permalink)  
Old July 29th, 2005, 11:36 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I don't think you should be copying code from a VB application without knowing what you're doing. This:

Dim QCcon as New ADODB-connection

is VB code where you can strongly declare a variable. In ASP you use late-binding, like this:

Dim QCcon
Set QCcon = Server.CreateObject("ADODB.Connection")

Also, instead of a - symbol, you need a dot between ADODB and Connection.

Whether you put this code in an include file or not is up to you. Both will work, and each will have their advantages.

But again, if you want to build a working application within the next month or so, I suggest you get a good book or web site. Any ASP or ADO book shows you how to connect to a database in a few pages. Struggling with code copied from a desktop app might take you ages, making things more expensive than the investment in a book.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #16 (permalink)  
Old July 29th, 2005, 10:58 PM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

i have a boock about ADO but my company force me to upload it as soon as possible and i don't have enough time to studi this boock completely.but i'm reading it noe to find some thing useful.please help me to upload it
thank you

Reply With Quote
  #17 (permalink)  
Old July 29th, 2005, 11:02 PM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

excuse me.i upload new conection page right now bur this time it gives me this error(i think my data base doesn't know the user):
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

/login.asp, line 14


Reply With Quote
  #18 (permalink)  
Old July 30th, 2005, 03:37 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote: have a boock about ADO but my company force me to upload it as soon as possible and i don't have enough time to studi this boock
Of course it's entirely up to you, but IMO working on a solution without really understanding how to do it results in bad applications that are delivered too late anyway.... I can imagine you're in a hurry, but I still think you may need to rethink your strategy.

Anyway, did you use Google or this forum's search feature for the error message?? You'll find loads of results for that error indicating that the current web server user isn't allowed to use the database. This is usually fixed by adding the IUSR_MachineName to SQL server and giving it just enough permissions to read (and possibly write to) the data.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #19 (permalink)  
Old July 30th, 2005, 04:02 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

you're exactly right.i'm really in hurry because my boss force me to do it as soon as possible and reading all the book takes much time and i can't spned this time now.but i'm reading ADO book during this time.i search for the result of this error and the think that find is that the user is not defined.i connect to my host support and tell them my problem they are looking for the result.because i have 2 table frome each tables that has attached to server
but please if find any other causes that can make this problem tell me
thank you

Reply With Quote
  #20 (permalink)  
Old July 30th, 2005, 04:17 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

No, AFAIK, the only reason for that error is that the IIS account doesn't have access to SQL Server. Your host should be able to fix that.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Upload vin_0x1 Classic ASP Databases 1 June 24th, 2006 05:35 PM
Upload a Text file from a Web Client to SQL Server petercyriljones Classic ASP Professional 0 May 20th, 2005 10:26 AM
Is it required to upload vti_cnf files...into web? ashokparchuri General .NET 1 May 20th, 2005 09:02 AM
how to upload a mysql db on web server umair_rathore MySQL 2 May 14th, 2005 05:46 AM
how to upload asp pages to web 222 Classic ASP Basics 1 June 10th, 2003 02:31 PM



All times are GMT -4. The time now is 11:53 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.