|
-
Apr 4th, 2003, 02:41 AM
#1
Thread Starter
New Member
VB Script (db con) question
Hi.
I have an excel macro (vb script) that i have to tweak a bit but ive never worked with vb script before (being a c++/java programmer).
I was wondering (to put it mildly) how the heck I can debug things when I get errors like “runtime error no 212302840943” and have no clue what it is or how to fix it. 
Ive tried pressing f1 to get a detailed description of the error although it doesn’t help a vbs noob like me.
Any suggestions? I would really appreciate it
A code snippet:
Dim DDE As New DdeLib.DdeConnection
DDE.Connect "KONTAKT", "SERVER" <-- gets stuck here (the strings are defined in another place in the code)
-
Apr 4th, 2003, 02:40 PM
#2
Junior Member
First off the best place to go for vb scripts, after here, of course, is probably the MS site. Try http://microsoft.com/technet
in terms of connection strings try:
set conn=wscript.CreateObject("ADODB.Connection")
set rs=wscript.CreateObject("ADODB.Recordset")
strSQL="SELECT * FROM tblwhatever"
conn.Open("Driver=SQL Server; Server=ServerName; Database=DBName; User ID=UserID; Password=PWord")
Set rs.conn.Execute(SQLString)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|