ADO Connection via VBA (Linked Fields)

Is there a simple way to use the Great Plains logged in user's credentials or 
DSN credientials when creating a VBA ADO connection to the database rather 
than having to specify the USERNAME and PASSWORD in code.

I had rather not code in a UserName and Password if at all possible.

My Current Connection String:
m_ConnectionString = "PROVIDER=MSDASQL;" & _
                                 "DSN=" GreatPlains";" & _
                                 "UID=jim;PWD=;"

PS: I don't want to use DUOS

Thanks
-- 
Jim Harkins
0
JimHarkins (11)
3/9/2005 5:55:04 PM
greatplains 29623 articles. 6 followers. Follow

2 Replies
777 Views

Similar Articles

[PageSpeed] 24

If you have access to partnersource or customersource, search for
RetrieveGlobals.dll
This will allow you to get the userid, password (encrypted), companyid and
connection string of the currently logged on user.

"Jim Harkins" <JimHarkins@discussions.microsoft.com> wrote in message
news:BBDEBF26-9805-4163-BC18-24084EA87235@microsoft.com...
> Is there a simple way to use the Great Plains logged in user's credentials
or
> DSN credientials when creating a VBA ADO connection to the database rather
> than having to specify the USERNAME and PASSWORD in code.
>
> I had rather not code in a UserName and Password if at all possible.
>
> My Current Connection String:
> m_ConnectionString = "PROVIDER=MSDASQL;" & _
>                                  "DSN=" GreatPlains";" & _
>                                  "UID=jim;PWD=;"
>
> PS: I don't want to use DUOS
>
> Thanks
> -- 
> Jim Harkins


0
jperlowin (33)
3/9/2005 6:58:11 PM
Jim, is good to know that the only password that RetrieveGlobals.dll doesn't
return is SQL Server "sa" user for security reasons.

Regards, Takashi

"Jed Perlowin" <jperlowin@firstfleet.com> wrote in message
news:eZXQapNJFHA.3992@TK2MSFTNGP10.phx.gbl...
> If you have access to partnersource or customersource, search for
> RetrieveGlobals.dll
> This will allow you to get the userid, password (encrypted), companyid and
> connection string of the currently logged on user.
>
> "Jim Harkins" <JimHarkins@discussions.microsoft.com> wrote in message
> news:BBDEBF26-9805-4163-BC18-24084EA87235@microsoft.com...
> > Is there a simple way to use the Great Plains logged in user's
credentials
> or
> > DSN credientials when creating a VBA ADO connection to the database
rather
> > than having to specify the USERNAME and PASSWORD in code.
> >
> > I had rather not code in a UserName and Password if at all possible.
> >
> > My Current Connection String:
> > m_ConnectionString = "PROVIDER=MSDASQL;" & _
> >                                  "DSN=" GreatPlains";" & _
> >                                  "UID=jim;PWD=;"
> >
> > PS: I don't want to use DUOS
> >
> > Thanks
> > -- 
> > Jim Harkins
>
>


0
tarikuma (52)
3/11/2005 2:04:34 AM
Reply:

Similar Artilces:

Sorting Alphanumeric values in a text field
I'm using Access 2003 for a database for my company. I have a field in a table that has both text and numbers. They are part numbers, for example 21BC124. I kept the field as text because of the text with in the numbers and didn't figure that a numeric field would alow the text. In my part numbers table it sorts correctly (first by number then by letter then by number again), but in my reports and queries there are a few number that sort in the wrong place. Like this... 20D10-3 21BC123 21BC128 22D10 25TD47 21FA101 21FA200 25FA203 38FA601 21FP604 38WS100 I can't quite f...

How to create a CustomerID field for custom entities
Hi, The customerid field is used in opportunity and case and it allows you to select an account or contact, Great. I want to create this field in a form for a new entity i have made, but i cant work out how. Please help. Hi Michael, Customer is special composite type which is not available for custom entities in CRM 3. You will need to add two separete lookup fields for account and contact. -- uMar Khan :: MS CRM MVP CRM Freelance Consultant Email :: imumar at gmail dot com Blog :: http://umarkhan.wordpress.com MVP :: https://mvp.support.microsoft.com/default.aspx/profile/umar.khan &...

Suggestion field
Hello, does anyone know how they call the suggestion field that appears at the explorer bar when you type an address. Or appears when you double-click on a username field. I would like to create something like that; maybe someone knows how to do that. It's probably simple but because I don't know the exact English word for it, it's hard to find. Thanks. You might want to take a look at IAutoComplete. Here is an interesting article that talks about it a bit. Tom http://msdn.microsoft.com/msdnmag/issues/0800/c/default.aspx "Woestenburg" <Woestenburg@discussions.micr...

Question On Fields
What is the (Microsoft desciption)difference between the SIC field and the Industry Code field? To me they seem like a duplication. Thanks! Shauna Hi, According to the Deployment Manager descriptions of attributes: SIC - Standard Industrial Classification code for the Account industrycode - the type of industry with which the account is associated... Hope this helps! "Shauna Koppang" <anonymous@discussions.microsoft.com> wrote in message news:034101c48af4$62524a70$a401280a@phx.gbl... > What is the (Microsoft desciption)difference between the > SIC field and the...

Subform in Datasheet View
Is there a way to have the datasheet view of a subform *not* show the "button-like" row that shows the field names? -- Thanks, tbl No there isn't. If you create a continuous style form, you can eliminate the headings. You can modify a continuous form so that it looks like a 'datasheet'. -- Joan Wild Microsoft Access MVP "tbl" <hateThatSpam@invalid.net> wrote in message news:4gqs13dds31nhu1bsmbrm5tt86adbfea1m@4ax.com... > Is there a way to have the datasheet view of a subform *not* > show the "button-like" row that shows the field n...

Change links to hyperlinks in a workbook?
I have 5 Income Statement sheets in a workbook. The first sheet is an Income Statement summing four departments (listed by columns). Column B has Dept 1 data, column C has Dept 2 data, etc. ALL data on this sheet is linked (referenced) to the other four sheets which are the individual departments. I know I can set hyperlinks one at a time, but is there a way for me to have each of those links (every cell containing the data from the other four sheets) become hyperlinks? If I have to add another sheet that mirrors the summary sheet but has hyperlinks, that would be fine. I am just ...

Linked graphics into a Publisher 2000 document
I have a 400KB document (withgout graphics). I insert two JPEG images each around 200KB into the document. I figure the resulting document should be around 700KB. Result? An 11MB file. I delete the images (document is now 400KB) and instead insert the images using the "Link to File" option. Graphics Manager confirms that the images are linbked into the file. The size should not be more than 500KB. Result? An 11MB file. Question is how can I insert images into a Publisher 2000 documentr without the file blowing up? And why does it blow up? Regards, Richard. Richard wrot...

RDC Connection
I have one laptop running Windows XP Home SP2 and one desktop running Windows XP Home SP2 and am trying use remote desktop to access each computer from the other. However, I keep getting the error "This computer can't connect to the remote computer." I have looked for answers everywhere with no successful solutions....Help!!! K. Curtis I'm not 100% sure, but I don't think XP Home supports RDC. Frank Hamelly, MCP-GP NOVA Solutons LLC Melbourne, FL Hi Kala, You can not remote desktop into a Windows XP Home system. You will need to upgrade to Windows XP Professiona...

Changing the Selection Fields in a Combo Box
Hi, I've created a Combo Box using the Controls Wizard. In creating the control, I specified that my unique value to be stored in the table is an ID. When the user views the selection options in the Combo Box, I'd like to have the ID field hidden and only see the text values, while still storing the ID in the appropriate column. This is probably a second question. Also, when the user views a form that has been populated, I'd like them to see the actual textual values on the form, as just the stored ID value. Is that possible to do with the one Combo Box or is that...

Formula for date field
1.I have simple dates in one column (say column A) . 2.In the next column(Column B) I would like the date five months after Column A to be displayed.Eg if Column A has an entry of 9th June 2007,Column B should display 8th November,2007. 3.A simple formula does not do the job as this does not take into account the different number of days in different months! regards S.Sanatani Your post is a bit ambiguous since you don't really say how the different number of days in months should be handled. One way: A1: <date> B1: =DATE(YEAR(A1),MONTH(A1)+5,DAY(A1)-1) In articl...

OAB field size limitations
Hi, we've noticed several user display names getting cut off within the offline address book. There appears to be a limit of 64 characters. If I look at the corresponding user entry in the "live" address book it displays correctly. If I search for the user in my copy of the offline address book it is cut off at the 64 character mark. Does anyone know if this is indeed a limitation of the OAB? I can't seem to find much about this anywhere. OAB property filtering for Exchange 2003 Service Pack 2 OAB Version 4 - http://blogs.msdn.com/dgoldman/archive/2006/04/29/586827.asp...

Contact looses Post Office Box field when synchronized to Outlook
When I sync contacts from CRM 4.0 to Outlook, the Post Office Box field from the contact gets empty. Anyone has the same issue? ...

How can I parse or Loop a list based on single field to Googlemaps
This is some code that will parse each sequential field [Point_#) into a list for googlemaps. [Form_Runs].WebRouteMap.navigate "http://maps.google.co.uk/maps?f=q&hl=en&q=" & "from: " & Me.Point_1 & (" to: " + Me.Point_2) & (" to: " + Me.Point_3) The table/form is laid outlike this: [Route_No] [Point_1] [Point_2] [Point_2] 5 North St, N1 East St, N3 High Road, W6 And the code will give this style of parsed list: from: North St, N1 to: East St, N3 to: High Road, W6 That works just ...

Lognormal in VBA
I'm trying to find a lognormal fuction for MS Access so I can . I can see the built-in one in Excel but I don't want to have to use an Excel app in my code just to use this worksheet function. I can find the VBA code for a normal distribution function but I want to find a coded version of the lognormal function. Does anybody have any ideas where I can find one? Cheers Lee DaviesL wrote: > I'm trying to find a lognormal fuction for MS Access so I can . I can > see the built-in one in Excel but I don't want to have to use an Excel > app in my code just to use this...

Excel link update question
I need to maintain an excel workbook which contains a lot of links to other workbooks. Since the linked workbooks change every week, I need to change all the links accordingly. For example, a cell with formula "='[aug_28.xls]sheet1' !A10" will be changed into "='[sep_4.xls]sheet1'!A10". I tried to do this with Find/Replace. However, the link is updated every time it is changed. The link updating takes a couple of seconds. So it may take a hour to finsh it for a workbook with thousands of links. Could anyone tell me how to shut down the link updating when...

break links #2
Is it possible to break links between excel files to publisher files? I have a chart that is linked into a publisher file, but i dont know how to turn off the link. is it possible? thanks George Copy the chart, paste special as an Enhanced Metafile, delete the linked chart. -- Mary Sauer http://msauer.mvps.org/ "George" <George@discussions.microsoft.com> wrote in message news:A1556BA0-4291-4359-9D79-0EBD0B136B7D@microsoft.com... > Is it possible to break links between excel files to publisher files? > I have a chart that is linked into a publisher file, but i dont k...

Unable to Send/Recv When Connected to Pub Wireless or DSL
I am unable to send or receieve emails using Outlook when I connect to the Internet using the public library Wireless network, or connect to the Internet using a friends DSL or High Speed Cable connection. Seems I am only able to send and receive when I connect by modem at home. Is there a configuration issue I am not aware of that I can modify to allow me to send and receive when I am not at home on dial-up? Thanks in Advance. I believe because you have outgoing and incoming settings on your home email account (when you set it up) and also because it looks for the IP address is wh...

Link to Power Point
Hi, I placed a hyperlink to a powerpoint file on my web page. Upon clicking on the link the "Run/Save" window comes up. Is it possible to just have the Power Point file run without the "Run/Save" window coming up? If so, how? Thanks, -- Phil Posting a question 4 times isn't going to get you an answer any quicker. Try to be a bit more patient. Craig Phil wrote: >Hi, >I placed a hyperlink to a powerpoint file on my web page. Upon clicking on >the link the "Run/Save" window comes up. Is it possible to just have the >P...

Hyper link one column to another
I would like to have my columns hyper link one another. For example: Click on B2 would take you to N2, and vice-versa. Click on C2 would take you to O2... and so on through column j linked to V. Is this possible without having to make the link for each cell? This is a timesheet template and the columns b though J are the hours and N through V are the text comments for those hours. When I copy the template to a new sheet, there will be no data in any column. I would like to be able to enter an amount or formula (=end-start) for time spent and then be able to click on that cell and hyperlin...

vba code to enable macros
Hi, Can we write a vba code to enable macros. In most of the sites it says we cant do that . The only thing we can do is change the macro setting or work around is hide the sheet which has macros. But none of them will work in my case. Can we change an excel security setting to from macro on open so that macros are enabled. No. If we can do that with code, then so could a hacker with bad intentions. Mike F "varsha12" <varsha12@discussions.microsoft.com> wrote in message news:DBEB1614-C956-491B-B351-02DD9F711891@microsoft.com... > Hi, > Can we w...

unable to change password via OWA
Hi, I am having a problem with users changing passwords via OWA. When they click on the change password button, it comes up with change password screen and asked for domain name, user name , old password ,etc. The problem that I have is that when I submit it, it comes up with message saying "Either the password is too short or password uniqueness restrictions have not been met." But I didn't define any password policy on DC. What can I do ? Kindly please give me some idea. Thanks Losa If you are running windows and exchange 2003 then there are password requirements that...

linking sheets
Hi All, How do i link my drop down list in a13 sheet 1 to column f in sheet 2. Hi Jinx if using Data Validation to create your drop down list the easiest way is to range name column F in sheet 2 (go to sheet 2, click on F, click in name box (left hand side of formula bar) type name (no spaces), press enter) then click in Sheet1!A13, choose Data / Validation, choose List - click IN the big white box, press you F3 key to bring up list of names in workbook, choose the name, click OK, click OK again and it should work fine. Hope this helps Cheers JulieD "Jinx" <anonymous@discus...

New Named Range Created Each Time Data Imported into Excel via Macro
I have noticed that each time I import data into an Excel spreadsheet via a macro, a new named range (for the same range) is created. This does not pose a problem, but after a while, I'll have a huge number of named ranges that will never be used. Why does Excel name the range and how can I stop this? I noticed in the recorded macro, there was a line .Name = "drd_5". I commented this out to see what would happen, but it just renamed the range "ExternalData_5". The next one was "ExternalData_6", etc. Thanks, Carroll Rinehart You could refresh with differen...

connect to simple COM
This is a multi-part message in MIME format. ------=_NextPart_000_0023_01C89E37.9E641C50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable is there a simple example on C or CPP or MFC how i can connect to simple = COM that has one interface and some methods with their arguments thank you Dani ------=_NextPart_000_0023_01C89E37.9E641C50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> &l...

Mail Merge with Word 2003
Please Help if you can. I have lost hours editing a Mail Merge Master document, only to find none of the changes are saved when you reopen. Here's what happened: I want to edit the fields in a mail merge document. I want to search for the {OLD-FIELD} and replace it with the {NEW FIELD}. Word does not seem to allow me to do this. First, it will not let me cut and paste the fields into the Search & Replace Box. Secondlly, after hours of laboriously replacing my Fields one at a time, and dutifully saving, NONE of the changes were saved. The changes are all shown in ...